Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

Thanks for the reply. Unfortunately I get the same results...

$ perl -e 'use WWW::Mechanize; my $mech = WWW::Mechanize->new; my $hro= $mech->get(q{http://www.perlmonks.com/}); print $hro->content'

Error GETing http://www.perlmonks.com/: Protocol scheme 'http' is not supported at -e line 1.

However, oddly enough if I do the same command with sudo I get the following:

$ sudo perl -e 'use WWW::Mechanize; my $mech = WWW::Mechanize->new; my $hro= $mech->get(q{http://www.perlmonks.com/}); print $hro->content'

HTML::Parser object version 3.69 does not match bootstrap parameter 3.55 at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/XSLoader.pm line 94.

Compilation failed in require at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/HTML/Entities.pm line 152.

Compilation failed in require at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/HTML/TokeParser.pm line 9.

BEGIN failed--compilation aborted at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/HTML/TokeParser.pm line 9.

Compilation failed in require at /usr/lib/perl5/site_perl/5.8.8/WWW/Mechanize.pm line 134.

BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.8/WWW/Mechanize.pm line 134.

Compilation failed in require at -e line 1.

BEGIN failed--compilation aborted at -e line 1.

So I checked HTML::Parser and the rest and found:

$ sudo perl -MCPAN -e shell

cpan shell -- CPAN exploration and modules installation (v1.9800) Ente +r 'h' for help. cpan[1]> install HTML::Parser HTML::Parser is up to date (3.69). cpan[2]> install XSLoader XSLoader is up to date (0.15). cpan[3]> install HTML::Entities HTML::Entities is up to date (3.69). cpan[4]> install HTML::TokeParser HTML::TokeParser is up to date (3.69). cpan[5]> install WWW::Mechanize WWW::Mechanize is up to date (1.72).

And then looking at my @INC and doing some find'ing I'm seeing:

$ perl -e 'print join("\n",@INC);' /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 . $ $ $ sudo find /usr -name Mechanize.pm -exec ls -l {} \; -rwxr-xr-x 1 root root 79472 Feb 2 16:38 /usr/lib/perl5/site_perl/5.8 +.8/WWW/Mechanize.pm $ $ $ sudo find /usr -name Parser.pm -exec ls -l {} \; -r--r--r-- 1 root root 39789 Oct 15 2011 /usr/lib64/perl5/site_perl/5 +.8.8/x86_64-linux-thread-multi/HTML/Parser.pm -rw-r--r-- 1 root root 39509 Jul 10 2006 /usr/lib64/perl5/vendor_perl +/5.8.8/x86_64-linux-thread-multi/HTML/Parser.pm -rw-r--r-- 1 root root 27103 Aug 18 2003 /usr/lib64/perl5/vendor_perl +/5.8.8/x86_64-linux-thread-multi/XML/Parser.pm -rw-r--r-- 1 root root 64063 Dec 16 2011 /usr/lib/perl5/5.8.8/Pod/Par +ser.pm -r--r--r-- 1 root root 51259 Feb 20 2011 /usr/lib/perl5/5.8.8/TAP/Par +ser.pm $ $ $ sudo find /usr -name TokeParser.pm -exec ls -l {} \; -r--r--r-- 1 root root 10104 Oct 15 2011 /usr/lib64/perl5/site_perl/5 +.8.8/x86_64-linux-thread-multi/HTML/TokeParser.pm -rw-r--r-- 1 root root 10134 Apr 26 2006 /usr/lib64/perl5/vendor_perl +/5.8.8/x86_64-linux-thread-multi/HTML/TokeParser.pm $

Does any of that give a clue as to what's going on here...?


In reply to Re^2: Protocol scheme 'http' is not supported by ggerke
in thread Protocol scheme 'http' is not supported by ggerke

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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others exploiting the Monastery: (4)
    As of 2014-09-20 10:37 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      How do you remember the number of days in each month?











      Results (158 votes), past polls