CGI-PrintWrapper

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    CGI::PrintWrapper arranges for CGI methods to output their results by
    printing onto an arbitrary handle. This gets around the problem that the
    CGI's subs return strings, which may be inconvient when you wish to use
    CGI for something besides CGI script processing.

    You could just call `print' yourself on the appropriate file handle, but
    there are many contexts in which it is cleaner to provide the extra
    abstraction (such as mixing CGI with HTML::Stream, the problem which
    prompted my solution, illustrated above).

    CGI::PrintWrapper creates the necessary callbacks for printing
    dynamically, updating the symbol table as it encounters a new CGI
    method.

CONSTRUCTOR
    `new ($h)'
        Creates a new CGI::PrintWrapper, printing the results of CGI methods
        onto the print handle object, `$h'.

    `new ($h, @cgi_args)'
        Creates a new CGI::PrintWrapper, printing the results of CGI methods

lib/CGI/PrintWrapper.pm  view on Meta::CPAN

B<CGI::PrintWrapper> arranges for CGI methods to output their results
by printing onto an arbitrary handle.  This gets around the problem
that the B<CGI>'s subs return strings, which may be inconvient when
you wish to use B<CGI> for something besides CGI script processing.

You could just call C<print> yourself on the appropriate file handle,
but there are many contexts in which it is cleaner to provide the
extra abstraction (such as mixing B<CGI> with B<HTML::Stream>, the
problem which prompted my solution, illustrated above).

B<CGI::PrintWrapper> creates the necessary callbacks for printing
dynamically, updating the symbol table as it encounters a new B<CGI>
method.

=head1 CONSTRUCTOR

=over

=item C<new ($h)>

Creates a new B<CGI::PrintWrapper>, printing the results of B<CGI>



( run in 0.460 second using v1.01-cache-2.11-cpan-9b1e4054eb1 )