NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use
trunk.foswiki.org to view this page for some minimal testing.
Use
Item9693 for docu changes for 1.2 and 2.0.
Item8765: "use base qw(Somepackage);" shall not be used
| Priority: |
CurrentState: |
AppliesTo: |
Component: |
WaitingFor: |
| Normal |
Closed |
Engine |
|
|
the use base was only intended to work alongside use fields.
perl 5.10 introduces parent.pm to fill the gap, but the safe way is to:
use Module;
our @ISA qw( Module );
Globally and manually fixing all .pm files.
perl -i -ple's/^([^#]*)use base +qw\( *(\S+) *\);/$1use $2;\n$1our \@ISA = qw( $2 );/'
+ manually checked all differences.
--
OlivierRaginel - 24 Mar 2010
Done.
Please note that mostly the only difference is that use base is evaluated at compile time, whereas our @ISA is done at runtime, which can cause issues in BEGIN blocks (but I've checked them all and fixed them where needed).
--
OlivierRaginel - 25 Mar 2010