Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: both base and sub class in same fileby Sidhekin (Priest) |
on Oct 11, 2007 at 13:29 UTC ( [id://644222]=note: print w/replies, xml ) | Need Help?? |
This is happening because base ends up requireing Foo, which in turns ends up doing Foo.pm, since it hasn't been Update 2: The safeguard is in require, of course. ikegami++. The workaround below is still useful for those "executable modules", but unnecessary for most purposes. (Oh, and for completeness, use happens at compile time, and so is run even with the -c option.) Update: A workaround: Add a $VERSION variable to Foo, as this prevents base from trying to load it again:
print "Just another Perl ${\(trickster and hacker)},"
In Section
Seekers of Perl Wisdom
|
|