Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id: 36250
Status: resolved
Priority: 0/
Queue: Test-WWW-Mechanize

People
Owner: Nobody in particular
Requestors: hdp [...] cpan.org
Cc:
AdminCc:

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



Subject: post_ok's API does not match post
The hashref of 'LWP options' for post_ok is passed to $mech->post as a reference instead of as a list. This means that it is useless for setting any request options (Content-Type is the one I care about here), and can only set form parameters. Compare (from post_ok): $self->post( $url, \%opts ); vs. (from get_ok) $self->get( $url, %opts ); I think ideally it would be: $mech->post_ok($url, \%form_params, $desc); or $mech->post_ok($url, \@lwp_options, $desc); (where @lwp_options could include \%form_params) post_ok isn't documented to take an an arrayref now, so maybe the behavior of passing in an arrayref could change?
This has already been changed. Future tickets to http://code.google.com/p/www-mechanize/issues/list please. Thanks, xoxo, Andy