trusty (3) Test::CGI::Multipart::Gen::Text.3pm.gz

Provided by: libtest-cgi-multipart-perl_0.0.3-1_all bug

NAME

       Test::CGI::Multipart::Gen::Text - Generate text test data for multipart forms

VERSION

       This document describes Test::CGI::Multipart::Gen::Text version 0.0.3

SYNOPSIS

           use Test::CGI::Multipart;
           use Test::CGI::Multipart::Gen::Text;

           my $tcm = Test::CGI::Multipart;

           # specify the form parameters
           $tcm->upload_file(
               name='cv',
               file=>'cv.doc',
               paragraphs=>6,
               type=>'text/plain'
           );
           $tcm->set_param(name=>'first_name',value=>'Jim');
           $tcm->set_param(name=>'last_name',value=>'Hacker');

           # Behind the scenes this will fake the browser and web server behaviour
           # with regard to environment variables, MIME format and standard input.
           my $cgi = $tcm->create_cgi;

           # Okay now we have a CGI object which we can pass into the code
           # that needs testing and run the form handling various tests.

DESCRIPTION

       This is a callback package for Test::CGI::Multipart that facilitates the testing of the upload of text
       files of a given size and sample content.  It generates random text using Text::Lorem.

INTERFACE

       For information  on how to use this module, see Test::CGI::Multipart, in particular the section on
       callbacks. The effect of loading this module is that the "value" parameter ceases to be mandatory.
       Instead one can use one of "words", "sentences", "paragraphs" which are simply passed to Text::Lorem. Of
       these the highest priority is "words", then "sentences".

DIAGNOSTICS

       "No words, sentences or paragraphs specified"
           This module does require that at least one of the three Text::Lorem parameters is provided.

CONFIGURATION AND ENVIRONMENT

       Test::CGI::Multipart::Gen::Text requires no configuration files or environment variables.

BUGS AND LIMITATIONS

       No bugs have been reported.

       Please report any bugs or feature requests to "bug-test-cgi-multipart@rt.cpan.org", or through the web
       interface at <http://rt.cpan.org>.

AUTHOR

       Nicholas Bamber  "<nicholas@periapt.co.uk>"

       Copyright (c) 2010, Nicholas Bamber "<nicholas@periapt.co.uk>". All rights reserved.

       This module is free software; you can redistribute it and/or modify it under the same terms as Perl
       itself. See perlartistic.

DISCLAIMER OF WARRANTY

       BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT
       PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
       PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
       INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
       PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE
       SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

       IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY
       OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE
       TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF
       THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
       RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE
       WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
       DAMAGES.