CGI::Prototype::Mecha gets smarter

merlyn on 2005-05-11T23:35:33

Today, for $client, I was trying to test a file upload field using my CGI::Prototype::Mecha (since the application is written in my CGI::Prototype, it just makes sense).

Ugh. No, file uploads appear very weirdly in the LWP::Request object I'm getting from WWW::Mechanize, and faking up a CGI.pm object was just a bit tough. After banging my head on it for an hour or two (and realizing/remembering that I have to call CGI::_reset_globals on every hit), I've achieved a very nice result. The code is more unified than before, and requires a lot less black magic.

Now when I get to $work tomorrow, I can continue those tests, after downloading the new distro from the CPAN. Yeay.