and your code thus is equivalent toMay be worse:use Shell qw( perl ); BEGIN { Shell->import( qw( dir ) ); } BEGIN { Shell->import( qw( copy ) ); } BEGIN { Shell->import( qw( del ) ); } BEGIN { Shell->import( qw( cd ) ); }
Despite that only the first invocation of require compiles the module, it's still a sequence of invocations on the same function (require) with the same argument (Shell) within inside the very same file.BEGIN { require Shell; Shell->import( qw( perl ) ); } BEGIN { require Shell; Shell->import( qw( dir ) ); } BEGIN { require Shell; Shell->import( qw( copy ) ); } BEGIN { require Shell; Shell->import( qw( del ) ); } BEGIN { require Shell; Shell->import( qw( cd ) ); }
Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!
In reply to Re^2: ActivePERL is the devil?
by naikonta
in thread ActivePERL is the devil?
by james734
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |