XP is just a number | |
PerlMonks |
Re: Export from module in subdirectoryby tobyink (Canon) |
on Oct 09, 2012 at 19:16 UTC ( [id://998058]=note: print w/replies, xml ) | Need Help?? |
use does three relatively unrelated things. The line use Foo::Bar 1.0 qw(foo); does, in sequence:
Now, I say those things are unrelated, but if the file Foo/Bar.pm contains a package definition for Foo::Bar, which defines $VERSION and import then it all comes together beautifully. In your situation, lib/test.pm doesn't contain a package definition for lib::test, but contains a package definition for test, so it doesn't all work together. That said, it's easy enough to put those three stages together manually, so that it works for your particular situation...
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
In Section
Seekers of Perl Wisdom
|
|