in reply to Logging URLs that don't return 1 with $mech->success

while ( $mech->links )

should be

for ( $mech->links )

Also, I'm not convinced of the reliability of following a link on Page A after having followed a link to Page B. It appears to work for now, but there could easily be side effects, and the behaviour could easily change in the future.

Replies are listed 'Best First'.
Re^2: Logging URLs that don't return 1 with $mech->success
by stonecolddevin (Parson) on Sep 11, 2008 at 01:16 UTC

    Also, I'm not convinced of the reliability of following a link on Page A after having followed a link to Page B

    I don't really understand this. Can you explain where the unreliability is?

    Thanks for pointing out the while issue!

    meh.

      Potential unreliability. It doesn't look right to me to follow a link that exists on a page the Mechanize object no longer has loaded. It could very well be that the Link object is independent of the page that spawned it, but to rely on that sounds dangerous to me. It might not be, but it's worth looking into and adding comments explaining this.