in reply to Re: Redefined import method and EXPORT not working
in thread Redefined import method and EXPORT not working
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()'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Redefined import method and EXPORT not working
by Corion (Patriarch) on Dec 22, 2014 at 14:10 UTC |