NAME

WWW::CurlOO::Simple::Form - simplify WWW::CurlOO::Form a little

SYNOPSIS

use WWW::CurlOO::Simple;
use WWW::CurlOO::Simple::Form;

my $form = WWW::CurlOO::Simple::Form->new();
$form->contents( foo => "bar" )->file( photos => glob "*.jpg" );
$form->add( name => "html", contents => "<html></html>",
    contenttype => "text/html" );

WWW::CurlOO::Simple->new->post( $uri, \&finished, $form );

CONSTRUCTOR

new

Creates an empty multipart/formdata object.

my $form = WWW::CurlOO::Simple::Form->new;

METHODS

add( OPTIONS )

Adds a section to this form. Behaves in the same way as add() from WWW::CurlOO::Form but also accepts literal option names. Returns its own object to allow chaining.

contents( NAME, CONTENTS )

Shortcut for add( name => NAME, contents => CONTENTS ).

file( NAME, FILE1, [FILE2, [...] ] )

Shortcut for add( name => NAME, file => FILE1, file => FILE2, ... ).

SEE ALSO

WWW::CurlOO::Simple WWW::CurlOO::Form curl_formadd(3)

COPYRIGHT

Copyright (c) 2011 Przemyslaw Iskra <sparky at pld-linux.org>.

This program is free software; you can redistribute it and/or modify it under the same terms as perl itself.