My website is hosted by yahoo... So in order to use perl modules not available on the yahoo server I create a subdirectory at my mount point on the yahoo server called /lib... I put a use statement near the top of the program... I manually upload all the .pm files in the proper sub-directories (i assume) and everything seems to run correctly to this point. So I can run my script from anywhere, even my cellphone browser.
use lib '../lib';

It works well for the most part... I added some code that pipes the error logs to the browser...
BEGIN { $| = 1; open (STDERR, ">&STDOUT"); print qq~Content-type: text/html\n\n~; }

The problem is I get an error that I'm not sure how to handle... First four are no problem, but the fifth one indicates it "Can't locate object method "new"" which does exist or it would error out before getting here. I use the CPAN module, and have re-copied it a number of times...
Use of uninitialized value in sprintf at /usr/lib/perl5/site_perl/5.8. +7/HTTP/Request/Common.pm line 18. Use of uninitialized value in sprintf at /usr/lib/perl5/site_perl/5.8. +7/HTTP/Request/Common.pm line 18. Use of uninitialized value in sprintf at /usr/lib/perl5/site_perl/5.8. +7/HTTP/Headers/Util.pm line 6. Use of uninitialized value in sprintf at /usr/lib/perl5/site_perl/5.8. +7/HTTP/Headers/Util.pm line 6. Can't locate object method "new" via package "HTML::TreeBuilder::XPath +" at ../lib/Web/Scraper.pm line 115. Return Code: 512
If I run it off my own server everything is fine... But from Yahoo it blows up here... Any thoughts? Hints?
# need to modify directly the HTML::Element package, because HTML::Tre +eBuilder won't let me # change the class of the nodes it generates package HTML::Element; use Scalar::Util qw(weaken); use vars qw(@ISA); push @ISA, 'HTML::TreeBuilder::XPath::Node'; use XML::XPathEngine; { my $xp; sub xp { $xp ||=XML::XPathEngine->new(); return $xp; } }
Does this mean I need more modules? possibly?

In reply to Yahoo Hosting by tbone654

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.