Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^4: GD and LWP giving 500 errors

by Schmunzie (Sexton)
on Mar 17, 2017 at 11:49 UTC ( #1185013=note: print w/replies, xml ) Need Help??


in reply to Re^3: GD and LWP giving 500 errors
in thread GD and LWP giving 500 errors

I can't claim I really understand what your code is doing but I tried it...

With perlml in the shebang, it gave a 500 error.

With just perl, it gave
Testing<pre> new to %INC from adding use Data::Dumper Carp.pm => /usr/share/perl5/vendor_perl/Carp.pm Data/Dumper.pm => /usr/lib64/perl5/vendor_perl/Data/Dumper.pm Exporter.pm => /usr/share/perl5/vendor_perl/Exporter.pm XSLoader.pm => /usr/share/perl5/XSLoader.pm bytes.pm => /usr/share/perl5/bytes.pm constant.pm => /usr/share/perl5/vendor_perl/constant.pm overload.pm => /usr/share/perl5/overload.pm overloading.pm => /usr/share/perl5/overloading.pm vars.pm => /usr/share/perl5/vars.pm warnings/register.pm => /usr/share/perl5/warnings/register.pm </pre> <pre> eval use ERROR:Can't locate CGI/Carp.pm in @INC (@INC contains: /usr/l +ocal/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl +/usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at +(eval 2) line 1. BEGIN failed--compilation aborted at (eval 2) line 1. new to %INC from adding use CGI::Carp qw(fatalsToBrowser) </pre> <pre> eval use ERROR:Can't locate GD.pm in @INC (@INC contains: /usr/local/l +ib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/s +hare/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at (eval +3) line 1. BEGIN failed--compilation aborted at (eval 3) line 1. new to %INC from adding use GD </pre> <pre> new to %INC from adding use LWP::UserAgent Config.pm => /usr/lib64/perl5/Config.pm Exporter/Heavy.pm => /usr/share/perl5/vendor_perl/Exporter/Heavy. +pm Fcntl.pm => /usr/lib64/perl5/Fcntl.pm HTTP/Date.pm => /usr/share/perl5/vendor_perl/HTTP/Date.pm HTTP/Headers.pm => /usr/share/perl5/vendor_perl/HTTP/Headers.pm HTTP/Message.pm => /usr/share/perl5/vendor_perl/HTTP/Message.pm HTTP/Request.pm => /usr/share/perl5/vendor_perl/HTTP/Request.pm HTTP/Response.pm => /usr/share/perl5/vendor_perl/HTTP/Response.p +m HTTP/Status.pm => /usr/share/perl5/vendor_perl/HTTP/Status.pm LWP.pm => /usr/share/perl5/LWP.pm LWP/MemberMixin.pm => /usr/share/perl5/LWP/MemberMixin.pm LWP/Protocol.pm => /usr/share/perl5/LWP/Protocol.pm LWP/UserAgent.pm => /usr/share/perl5/LWP/UserAgent.pm Storable.pm => /usr/lib64/perl5/vendor_perl/Storable.pm Time/Local.pm => /usr/share/perl5/vendor_perl/Time/Local.pm URI.pm => /usr/share/perl5/URI.pm URI/Escape.pm => /usr/share/perl5/URI/Escape.pm </pre> <pre> eval use ERROR:Can't locate x/x.pm in @INC (@INC contains: /usr/local/ +lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/ +share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at (eval + 7) line 1. BEGIN failed--compilation aborted at (eval 7) line 1. new to %INC from adding use x::x </pre>

Replies are listed 'Best First'.
Re^5: GD and LWP giving 500 errors
by huck (Parson) on Mar 17, 2017 at 12:10 UTC

    If you want to try again under perlml strike the following line

    use strict; use warnings;
    those are the only non evaled use statments. if it works, whew.

    otherwise it looks like LWP came in, but CGI/Carp and GD didnt

    you can strike addin('x::x',1); too. that was just there to display how a nonfound module would behave, and you got those.

    You could try adding addin('LWP::Simple',1); to see if it can find that.

    What it is doing is running the use statments under an eval. eval will trap the die preventing the script from issueing an error at that point and dieing. Since dieing means no output is sent back thats why you got the 500. It also lists all the modules added by that use statment. Since one module can use many others it can be quite informative.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2019-10-20 07:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?