Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Cache::Memcached and converting warnings to fatal

by Narveson (Chaplain)
on Apr 21, 2008 at 21:05 UTC ( [id://682030]=note: print w/replies, xml ) Need Help??


in reply to Cache::Memcached and converting warnings to fatal

I want to trap such warnings as errors (so I can eval/die in my code)

What is the return value from stats() when the warning is thrown? Is it logically false?

If so, you can say

use Fatal qw(Cache::Memcached::stats);

Of course, if this works, you can equally well say

my $stats = $memd->stats() or die;

and since you aren't doing that, I guess your failed stats() calls have been returning true values.

I would file a bug report.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://682030]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-25 13:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found