Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: the try/catch example from "Programming Perl" analyzed

by adrianh (Chancellor)
on Aug 19, 2004 at 13:05 UTC ( #384273=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub exception (;$) { 
        my $wanted_exception = shift;
    ...
        return 1 unless defined $wanted_exception;
        return ref($@) && $@->isa( $wanted_exception )
    };
    
  2. or download this
        eval { $coderef->() };
        if ( exception 'IOException' ) {
    ...
        } else {
            ... we lived ...
        };
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (16)
As of 2014-09-03 08:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (35 votes), past polls