- or download this
#!
BEGIN { # Convert the warning to Carp::cluck
$SIG{__WARN__} = sub {
...
print One()."\n";
exit;
- or download this
package Mod1;
use Exporter;
...
};
1;
- or download this
package Mod2;
use strict;
...
return "Mod1::One";
};
1;
- or download this
C:\Code\SecCage>perl redef.pl
Subroutine One redefined at Mod2.pm line 10.
at redef.pl line 5
...
at redef.pl line 5
main::__ANON__('Subroutine One redefined at redef.pl line 23.\
+x{a}') called at redef.pl line 23
second