A way around this is to actually define the entry in %INC. For instance:
package Foo::Bar; BEGIN { $INC{"Foo/Bar.pm"} = $0; use base "Exporter"; @EXPORT = "hi"; } sub hi { print "Hi from Foo::Bar" } package main; use Foo::Bar; hi();
antirice
The first rule of Perl club is - use Perl
The ith rule of Perl club is - follow rule i - 1 for i > 1
In reply to Re: sub-package question
by antirice
in thread sub-package question
by habit_forming
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |