|
|
| Don't ask to ask, just ask | |
| PerlMonks |
Re: Conditional loading of methodsby jasonk (Parson) |
| on Dec 09, 2008 at 04:33 UTC ( #729079=note: print w/ replies, xml ) | Need Help?? |
|
The only way you are going to get around the syntax problems is to only compile the code in question if the module exists....
but because that is going to introduce it's own problems, I would opt for moving that code into a module or a library...
As for the second part, because you are using eval BLOCK rather than eval STRING, the use will still be evaluated at compile time, rather than at run time. You could get the effect you are looking for by breaking the use up into it's components though...
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||