Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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?
[vedagiri89]: how do fix this issue
[choroba]: This usually happens when you have more than one version of Perl, and you mix the libraries
[hippo]: Which O/S?
[vedagiri89]: i have searched many forum...not getting resolutions
[vedagiri89]: centos
[Corion]: vedagiri89: Either what choroba said, or maybe you misspelled some module name (on Windows), like use Strict; or something like that.
[vedagiri89]: @choroba, what to do for that
[Corion]: Ah, you are not on Windows, so disregard my opinion.
[vedagiri89]: in centos, how to fix this.
[choroba]: You have to find out why it happened. Was there an OS update?

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (13)
As of 2018-06-19 11:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (113 votes). Check out past polls.

    Notices?