Alt::Base - Base class for alternate module
version 0.02
# in your Alt/Foo/Bar/phrase.pm: package Alt::Foo::Bar::phrase; use base qw(Alt::Base); 1; # customize options: package Alt::Foo::Bar::phrase; use base qw(Alt::Base); our %ALT = (check => 0, ...); 1;
The Alt::Base class provides common functionalities for an alternate module. For more information about the Alt concept, please refer to Alt.
Alt::Base defines an import() routine which checks for options in %ALT. These options are:
import()
%ALT
check => BOOL (default: 1)
If set to true (the default), will perform several things. First, check that the alternate module is indeed named Alt::<<Original::Module>::<phrase>. Then, load Alternate::Module and check that the package variable $ALT is defined with the value of phrase. This is to ensure that we are loading the correct module, and sometimes we do want to make sure about this. The wrong module can be loaded, for example if user reinstalls the original distribution or another alternate distribution.
Alt::<<Original::Module>::<phrase>
Alternate::Module
$ALT
phrase
Will die upon failure.
Alt
Steven Haryanto <stevenharyanto@gmail.com>
This software is copyright (c) 2012 by Steven Haryanto.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Alt::Base, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Alt::Base
CPAN shell
perl -MCPAN -e shell install Alt::Base
For more information on module installation, please visit the detailed CPAN module installation guide.