perl-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: [patch] Passing an existing request object to shortcuts methods
Date Thu, 18 Oct 2007 17:58:18 GMT
Fred Moyer wrote:
> Stas Bekman wrote:
>> Geoffrey Young wrote:
>>>
>>> Stas Bekman wrote:
>>>> I was trying to get GET, POST and other Apache::TestRequest methods to
>>>> accept a pre-existing HTTP::Request object, rather than pass arguments
>>>> that will construct one.
>>>>
>>>> The reason, I was trying to use HTML::TreeBuilder and
>>>> HTTP::Request::Form to fill-out a form and submit that, rather than raw
>>>> POST, e.g.:
>>>
>>> have you tried mech for this?  I haven't but have always wanted to
>>>
>>>   http://search.cpan.org/dist/WWW-Mechanize/
>>
>> What difference does it make?
> 
> There's some great syntactic sugar that make submitting forms relatively 
>  painless.  I've used it in my A::T programs by grabbing the port number 
> from the config hash and used a WWW::Mechanize->new object to do the calls.

Though it bypasses the A-T infrastructure, so if you are trying to rely 
on any of the features A-T provides, you can't. Which is probably OK for 
most people anyway.

-- 
_____________________________________________________________
Stas Bekman    mailto:stas@stason.org http://stason.org/
http://www.linkedin.com/in/stasbekman http://stasosphere.com/
http://stason.org/photos/gallery/     http://healingcloud.com
http://chestofbooks.com/              http://modperlbook.org/
                                       http://modperl2book.org


Mime
View raw message