- or download this
package child1;
...
1;
- or download this
package child2;
...
1;
- or download this
use strict;
use Carp;
...
croak ("couldn't invoke method #method on $class with params ($@)"
+)
}
- or download this
~/src/perl/poly$ perl main.pl child1 polyexample 1 2
polyexample (child1) called with [1] and [2]
- or download this
~/src/perl/poly$ perl main.pl child2 polyexample 1 2
polyexample (child2) called with [1] and [2]
- or download this
~/src/perl/poly$ perl main.pl child5 polyexample 1 2
Couldn't find package child5 (Can't locate child5.pm in @INC (@INC con
+tains: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.1
+0.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/per
+l/5.10 /usr/local/lib/site_perl .) at (eval 1) line 2.
BEGIN failed--compilation aborted at (eval 1) line 2.