And, although Perl5 doesn't support my $x= use ..., it does support (but doesn't document) the following rather neat trick:my $factory= require My::Object::Module;
...which you shouldn't use becase that will only work if you can guanantee that you are the only one who will ever require My::Object::Module. This undocumented return value only works the first time require is called. All subsequent requireings of that modules simply return 1.
D'oh!
- tyeIn reply to Re^2: Pragma (more) like Java's 'import'? (er, no!)
by tye
in thread Pragma (more) like Java's 'import'?
by djantzen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |