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; } }
|
---|
Back to
Cool Uses for Perl