![]() |
|
Do you know where your variables are? | |
PerlMonks |
Cache::Memcached and converting warnings to fatalby InfiniteLoop (Hermit) |
on Apr 21, 2008 at 18:14 UTC ( #681992=perlquestion: print w/replies, xml ) | Need Help?? |
InfiniteLoop has asked for the wisdom of the Perl Monks concerning the following question:
Greetings,
Im using Cache::Memcached in my script. The following call to stats() will throw warnings if the memcached server is not running:
I want to trap such warnings as errors (so I can eval/die in my code), hence I tried this in my code:
Since, the above pragma will not "leak across files" according to perllexwarn, Im forced to do this:
not that anything is wrong with setting up signal handlers, I want to know if I can somehow use the warnings pragma to achieve the same. Thanks.
Back to
Seekers of Perl Wisdom
|
|