Aendy has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

last week i started my script which gets data via socket.

Today it crashed with that error:
---
Can't locate Carp/Heavy.pm in @INC (@INC contains: /srv/www/cgi-bin/snat/unixmon /usr/lib/perl5/5.8.8/i586-linux-thread-multi /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/i586-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i586-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl .) at /usr/lib/perl5/5.8.8/Carp.pm line 255, <CONFIG> line -1596786226.
---


BUT: Carp/Heavy exists:
---
localhost:/ # find / -name "Heavy.pm"
/usr/lib/perl5/5.8.8/Carp/Heavy.pm
---

The path '/usr/lib/perl5/5.8.8/' is included in the @INC...


So i dont know what the problem ist...
And why the script crashed today...


I also tried to create a own script using carp::heavy
---
#!/usr/bin/perl

use strict;
use Carp::Heavy

print "test";
---

This works.


Could someone help me out?


Thanks for help
Aendy

Replies are listed 'Best First'.
Re: Can't locate Carp/Heavy.pm in @INC
by cdarke (Prior) on Aug 05, 2008 at 10:34 UTC
      i think that is it:
      http://www.nntp.perl.org/group/perl.perl5.porters/2007/04/msg122979.html Thanks for help
Re: Can't locate Carp/Heavy.pm in @INC
by linuxer (Curate) on Aug 05, 2008 at 09:42 UTC

    Your example (to print "test") misses a ';' behind "use Carp::Heavy"...

    Without seeing any code of your script, it's hard to guess, where the problem might be.

    Did you check the lines at Carp.pm around line 255? What happens there?

    What are you reading from Handle SOCKET? a line number -1596786226 looks strange to me. Looks like a overflow...

    Is your script running permanently for several days? Or is it started upon new requests?

    More details would be fine...

      Hi,

      sorry, the code was written without testing...

      The original script has more then 1000 lines so i think that it is not a good idea to post it here ;)

      carp.pm is a perl basemodul for errorreporting (which i did not use)

      The script is running all the time...
      But today it stoped with that error...


      i hope that helps