- or download this
$ perl -MAA -e 'AA->mysub()'
AA
BB
- or download this
perl -MBB -e 'AA->mysub()'
The method 'mysub' was not found in the inheritance hierarchy for AA a
+t /usr/local/lib/perl/5.14.2/Class/MOP/Class.pm line 1053.
...
Compilation failed in require.
BEGIN failed--compilation aborted.
- or download this
package AA;
use utf8;
...
print "AA\n";
shift->();
};
- or download this
package BB;
use utf8;
...
use CC;
sub mysub { print "BB\n";}
- or download this
package CC;
use AA;
1;
- or download this
$ perl -MBB -e 'AA->mysub()'
AA
BB
- or download this
package AA;
use utf8;
...
shift->SUPER::mysub();
};
- or download this
package BB;
use utf8;
...
sub mysub { print "BB\n";}
1;
- or download this
package CC;
use AA;
1;