I was working at a different site yesterday, so this is the earliest I could respond.

I didn't know about LWP::Debug, so thanks for adding to my enlightenment. If I have somehow conveyed the impression that I am generally knowledgeable about LWP, it was unintentional. My knowledge is pretty basic, and I'm trying to keep my projects pretty basic, too, for now.

Anyway, I've turned on the debug option, and changed the script to dump $a. The site is an intranet site, so you won't be able to run the code. I had the "whatever.com" in there as a too-oblique indicator of that.

Code is now:

#!perl # Automated navigation through web pages use strict; use warnings; use WWW::Mechanize; use LWP::Debug '+'; use Data::Dumper; my $a = WWW::Mechanize->new( autocheck => 1, agent => 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)' ); my $testpage = 'http://myprodportalv2.unocal.com:7778/portal/page?_pag +eid=33,30917,33_30962&_dad=puno2o&_schema=PORTAL_PUNO2O'; $a->get($testpage); $a->success() or do { open PAGE, '>failpage.html'; print PAGE Dumper($a); close PAGE; die 'Get failed: "'.$a->res->status_line."\" for\n".$testpage."\n +or ".$a->base()."\n"; };
Output is now:
C:\Documents and Settings\johnsro\My Documents\Perl>perl myfinint2.pl LWP::UserAgent::new: () LWP::UserAgent::request: () HTTP::Cookies::add_cookie_header: Checking myprodportalv2.unocal.com f +or cookies HTTP::Cookies::add_cookie_header: Checking .unocal.com for cookies HTTP::Cookies::add_cookie_header: Checking unocal.com for cookies HTTP::Cookies::add_cookie_header: Checking .com for cookies LWP::UserAgent::send_request: GET http://myprodportalv2.unocal.com:777 +8/portal/page?_pageid=33,30917,33_30962&_dad=puno2o&_schema=PORTAL_PU +NO2O LWP::UserAgent::_need_proxy: Not proxied LWP::Protocol::http::request: () LWP::UserAgent::request: Simple response: Not Implemented Get failed: "501 Not Implemented" for http://myprodportalv2.unocal.com:7778/portal/page?_pageid=33,30917,33_ +30962&_dad=puno2o&_schema=PORTAL_PUNO2O or http://myprodportalv2.unocal.com:7778/portal/page?_pageid=33,30917 +,33_30962&_dad=puno2o&_schema=PORTAL_PUNO2O
and the dumped file is
$VAR1 = bless( { 'req' => bless( { '_content' => '', '_uri' => bless( do{\(my $o = 'http +://myprodportalv2.unocal.com:7778/portal/page?_pageid=33,30917,33_309 +62&_dad=puno2o&_schema=PORTAL_PUNO2O')}, 'URI::http' ), '_headers' => bless( { 'user-agent' + => 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)' }, 'HTTP::Head +ers' ), '_method' => 'GET' }, 'HTTP::Request' ), 'status' => '501', 'content' => '', 'ct' => 'text/plain', 'res' => bless( { '_protocol' => 'HTTP/1.1', '_content' => '', '_rc' => 501, '_headers' => bless( { 'connection' + => 'Close', 'client-resp +onse-num' => 1, 'cache-contr +ol' => 'private', 'date' => 'W +ed, 19 Nov 2003 14:45:01 GMT', 'client-peer +' => '141.146.165.174:7778', 'content-len +gth' => '0', 'client-date +' => 'Wed, 19 Nov 2003 14:45:02 GMT', 'content-typ +e' => 'text/plain', 'server' => +'Oracle9iAS/9.0.2.2.0 Oracle HTTP Server Oracle9iAS-Web-Cache/9.0.2.2 +.0 (N)' }, 'HTTP::Head +ers' ), '_msg' => 'Not Implemented', '_request' => $VAR1->{'req'} }, 'HTTP::Response' ), 'page_stack' => [], 'redirected_uri' => $VAR1->{'req'}{'_uri'}, 'requests_redirectable' => [ 'GET', 'HEAD', 'POST' ], 'from' => undef, 'timeout' => 180, 'parse_head' => 1, 'base' => bless( do{\(my $o = 'http://myprodportalv2. +unocal.com:7778/portal/page?_pageid=33,30917,33_30962&_dad=puno2o&_sc +hema=PORTAL_PUNO2O')}, 'URI::http' ), 'quiet' => 0, 'protocols_forbidden' => undef, 'no_proxy' => [], 'protocols_allowed' => undef, 'use_eval' => 1, 'agent' => 'Mozilla/4.0 (compatible; MSIE 6.0; Window +s NT 5.1)', 'cookie_jar' => bless( { 'COOKIES' => {} }, 'HTTP::Cookies' ), 'proxy' => {}, 'max_size' => undef }, 'WWW::Mechanize' );

In reply to Re:* Mechanize and "Not implemented" by Roy Johnson
in thread Mechanize and "Not implemented" by Roy Johnson

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.