![]() |
|
Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: constant and eval (are they enemies?)by Anonymous Monk |
on May 22, 2002 at 19:52 UTC ( #168565=note: print w/replies, xml ) | Need Help?? |
You have to make it return a true value upon success.
eval "use constant CONST1 => 5; 1" or warn $@;
I'd suggest not using eval though. You can manually do what the use statement does for you.
Cheers, -Anomo
In Section
Seekers of Perl Wisdom
|
|