Exporter::WithBase - Like Exporter, but add '-base' to declare a child class
# file Mother.pm package Mother; use Exporter::WithBase; our @EXPORT = qw<ONE>; use constant ONE => 1; ... # file Child.pm package Child; # instead of: use parent 'Mother' use Mother -base; print ONE, "\n";
Does the same things as Exporter, but also supports a
-base flag. That flag can be used in the
use statement of a class to push the class into
-base flag must be the first argument in the import list:
use Mother qw( ONE -base ); # doesn't work use Mother qw( -base ONE ); # works
Olivier Mengué, <firstname.lastname@example.org>.
Copyright © 2012 Olivier Mengué.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.