in reply to Re^5: Exporter Problem
in thread Exporter Problem
Rob,
But if you load your MyPackage.pm module in a test.pl file containing:
then it fails with:use MyPackage ;
Can't locate object method "new" via package "FOO::Soldier" at MyPackage.pm line 7. Compilation failed in require at test2.pl line 3. BEGIN failed--compilation aborted at test2.pl line 3. One or more DATA sections were not processed by Inline.I think this has to do with the eval'd INIT block in Inline.pm around line 200. I think it runs at "run" time, while all the "use" stuff runs at compile time. So it's basically not run yet. If you call:
just before creating the FOO::Solfier objects it will fix the problem. PatrickInline->init() ;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^7: Exporter Problem
by syphilis (Archbishop) on Feb 23, 2013 at 10:12 UTC | |
Re^7: Exporter Problem
by osler (Sexton) on Feb 25, 2013 at 01:52 UTC |
In Section
Seekers of Perl Wisdom