Just another Perl shrine | |
PerlMonks |
Re^4: Problems sometimes loading File::Globby HuckinFappy (Pilgrim) |
on May 24, 2007 at 22:57 UTC ( [id://617361]=note: print w/replies, xml ) | Need Help?? |
I love learning things, and this was no exception.
First of all, a minor clarification: perl is smarter than me, in fact much to my consternation it's sometimes just darn clever (didn't it read Damian's book?). IAC, File::Glob does not get loaded at runtime. The compiler apparently notices you used <*> or glob() and loads File::Glob at compile time. So my solution of wrapping our glob() calls in an eval{} woulod not work. So I had to fight clever with clever. I'm sure this can be improved, so I'd love commentary. Here's the setup:
So I went into Module A and removed the use Module B; and replaced it with this:
Some limited testing done by forcing a croak() in ModuleB on the first 4 attempts shows it seems to work. We'll see in production use!
In Section
Seekers of Perl Wisdom
|
|