Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: How do I report an error back to the user of my object?

by thargas (Deacon)
on Jun 05, 2012 at 12:23 UTC ( #974441=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    package CoolObject;
    sub new {
    ...
      my $self = { name => 'new' }, $class;
      $self->loaddata() or die 'Error loading data';
      return $self;
    
  2. or download this
    my $co = CoolObject->new();
    # or if you want to trap the error...
    ...
    if ($@) {
      # do something about the error
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://974441]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2017-12-13 00:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (342 votes). Check out past polls.

    Notices?