That worked
package M1; use parent qw(Exporter); @EXPORT=qw(func); sub func{print "Hello"} sub import{ print "Imported"; print @_; M1->export_to_level(1,@_)} 1;
perl -I. -we 'use M1 qw(func);func()'
In reply to Re^2: Redefined import method and EXPORT not working
by Anonymous Monk
in thread Redefined import method and EXPORT not working
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |