Mention on the man page that one should remember to check first,
do { get_all_blogs_on_this_page() }
while ( $mech->find_link( text_regex => qr'下一頁' )
&& $mech->follow_link( text_regex => qr'下一頁' ) );
unless one wants to get nasty Link Not Found fatal messages.
Perhaps even use the results of the check instead of finding a second time.
Documentation patches welcome. Better that the person who finds the docs confusing submit the changes to the docs.
jidanni commented on Dec 19, 2010 :
Say: if follow_link() fails to find the link, the program will terminate with "Link Not Found". Therefore be sure to test first with find_link() when in doubt.
petda...@gmail.com commented on Apr 24, 2011 :
(No comment was entered for this change.)
Labels : WM
mark.sto...@gmail.com commented on Feb 4, 2013 :
I would rather that follow_link be modified to fail rather than die if the link can't be found. The diagnostics can clarify that the link can't be followed because it wasn't found, not because the link failed to return a "successful" response.
jidanni reported on Dec 19, 2010
Details
Imported from Google Code issue 192 via archive
WM
Comments
petda...@gmail.com commented on Dec 19, 2010 :
jidanni commented on Dec 19, 2010 :
petda...@gmail.com commented on Apr 24, 2011 :
WM
mark.sto...@gmail.com commented on Feb 4, 2013 :