Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Re: Re: Error::Simple

by broquaint (Abbot)
on Aug 20, 2003 at 13:02 UTC ( #285177=note: print w/replies, xml ) Need Help??

in reply to Re: Re: Error::Simple
in thread use Error::Simple - can't be found in @INC

Have you tried the code above? If it doesn't work I shall be quite surprised, and would also like to see the exact code used and the exact error message produced.
I will also add that I ran a search on my perl directories and could find only and not Error/
The Error::Simple package is defined in the file so there is no Error/ - running use Error::Simple will duly fail.


Replies are listed 'Best First'.
Re: Re: Re: Re: Error::Simple
by hotshot (Prior) on Aug 20, 2003 at 13:28 UTC
    Hi again!

    Here are my scripts, First
    package; use Error::Simple; # the line that shouts @ISA = qw(Error::Simple); 1;
    #!/usr/bin/perl -w use Error qw(:try); use MyError::SomeError; try { throw MyError::SomeError('Throwing some error'); } catch MyError::SomeError with { print "Caught it\n"; };
    And now the error message I get:
    Can't locate MyErrors/ in @INC (@INC contains: /usr/lib/pe +rl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5 +/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8 +.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-lin +ux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendo +r_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5. +8.0) at MyError/ line3. BEGIN failed--compilation aborted at MyError/ line3. BEGIN failed--compilation aborted at ./ line 4.
    May I add that is placed under my home - ~/Perl/, and is placed under ~/Perl/MyError/

      Right, firstly, Error::Simple is not a module it is a package that is defined in the file So should look like
      package MyError::SomeError; use Error; @ISA = qw/ Error::Simple /; 1;
      Secondly, take a look at your error message - Can't locate MyErrors/ Note the 's' after 'MyError', which would indicate that the code you're displaying isn't the exact code you're using.

      Please see. perlmod and Error before going any further.


      Try adding
      use lib '/home/YOURNAME/Perl';
      to the top of your script.
        It didn't help, but thatnks anyway.


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2020-10-22 20:56 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (230 votes). Check out past polls.