Skip Menu |

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

Report information
The Basics
Id: 2522
Status: resolved
Priority: 0/
Queue: WWW-Mechanize-Shell

People
Owner: corion [...] cpan.org
Requestors: mark [...] summersault.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.18
Fixed in: 0.19



Subject: Support for anonymous subroutines
To use W::M::S for automated form testing, it's important to be able to generate unique field names. "Random" isn't quite what I'm looking for, because I don't want the randomness restricted to fix set of values. Sys::UniqueID provides really unique strings. Support for something like that would be one way to go. (An option to specifiy the random string length would be ideal). I also tried this: autofill title Callback "'sub { 'Test '.`date` }" This causes the shell to die, though: Undefined subroutine &'sub { 'Test ::.`date` } called at /usr/local/lib/perl5/site_perl/5.8.0/WWW/Mechanize/FormFiller/Value/Callback.pm line 17. It would be nice if it at least didn't die, and at best provided a documented technique for providing some in-line perl code like this. I like the idea of this solution for filling in a field for testing, because it provides a human readable string, with a date that should make it "unique enough". Thanks Max.