The addition to %INC tells use/require that the package is already in memory, so it won't try to load it again.package my::foo; BEGIN { $INC{'my/foo.pm'} ||= 'dev/null'; } require exporter; # etc. package main; use my::foo;
In reply to Re^3: multiple "sub" packages in 1 file: possible? how?
by Beechbone
in thread multiple "sub" packages in 1 file: possible? how?
by perl-diddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |