Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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 taking refuge in the Monastery: (16)
As of 2014-07-10 14:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (212 votes), past polls