Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

WWW::Mechanize path dump

by simon.proctor (Vicar)
on Apr 13, 2005 at 08:50 UTC ( #447304=snippet: print w/ replies, xml ) Need Help??

Description: As part of recent tests I needed to see a visual dump of my path through an application to make sure I was doing things ok (handling redirects and meta refreshes etc). I'm new to Mechanize so I wrote this debug function in the absence of better knowledge :).
BEGIN
{
    sub WWW::Mechanize::worker_path
    {
        my $self = shift;
        
        foreach (@{$self->{page_stack}})
        {
            print STDERR $_->uri(),"\n";
        }
        
        return 1;
    }
}
Comment on WWW::Mechanize path dump
Download Code

Back to Snippets Section

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2014-08-02 08:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (55 votes), past polls