Skip Menu |

This queue is for tickets about the WWW-Mechanize-Shell CPAN distribution.

Report information
The Basics
Id: 16112
Status: new
Priority: 0/
Queue: WWW-Mechanize-Shell

People
Owner: Nobody in particular
Requestors: Marek.Rouchal [...] gmx.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



The "open" command in the shell does not allow to specify the things that $mech->follow_link(...) allows as arguments. Example: There is a <frame name="content" ...> on the current page, which I would like to load. The correct Mech code is: $mech->follow_link(name => 'content); but there is no simple way to specify this in W:M:S. I know there is eval $self->agent->follow_link(name => 'content') however it has the side effect that in the script the result is printed and I find this awkward to type. Suggestion: Allow a syntax like this: open name=content text_regex=/some\s+text/ which can be easily parsed by splitting the arguments on whitespace, see if they match /^(\w+)=(.*)$/ and if $2 =~ m:^/.*/$ then treat it with qr/.../. IMHO this simple extension would add a lot of convenience to this great module! Alternatively, you could add some artificial intelligence to the "open text" command: depending on the link type, text could be the link text or the frame name - and W:M:S could produce the correct follow_link from this. Maybe the sub link_text could be enhanced to show things like "name=str" or "text=str" which the open command will then understand. Cheers, Marek