Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: Error Handling with Packages

by anjoschu (Sexton)
on May 24, 2005 at 04:55 UTC ( #459851=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub new {
        my ($thing) = @_ ;
    ...
        # make sure to return true-evaluating or at least non-undef value
        return 1;
    }
    
  2. or download this
    $O->foo() or die "could not blabla: ".$O->error();
    
  3. or download this
    sub bar {
        my ($self) = @_;
    ...
    
    $O->bar() or die "could not blabla: ".$O->error();
    # "could not blabla: bar failed to rhubarb: foo: could not do thisandt
    +hat"
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2020-11-28 23:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?