- or download this
package M1;
use parent qw(Exporter);
...
sub func{print "Hello"}
sub import{print "Imported";@EXPORT=qw(func)}
1;
- or download this
perl -I. -le 'use M1;func()'
Imported
Undefined subroutine &main::func called at -e line 1.
- or download this
package M1;
use parent qw(Exporter);
...
sub func{print "Hello"}
#sub import{print "Imported";@EXPORT=qw(func)}
1;
- or download this
perl -I. -le 'use M1;func()'
Hello