NAME

Apache::RequestNotes - allow easy, consistent access to cookie and form data across each request phase.

SYNOPSIS

httpd.conf:

  PerlInitHandler Apache::RequestNotes
  PerlSetVar MaxPostSize 1024

MaxUploadSize is in bytes and defaults to 1024, thus is optional.

DESCRIPTION

Apache::RequestNotes provides a simple interface allowing all phases
of the request cycle access to cookie or form input parameters in a 
consistent manner.  Behind the scenes, it uses libapreq functions to 
parse request data and puts references to the data in pnotes.

EXAMPLE

 some Perl*Handler or Registry script:

   my $input      = $r->pnotes('INPUT');
   my $cookies    = $r->pnotes('COOKIES');
  
   # GET and POST data
   my $foo        = $input->get('foo');

   # cookie data
   my $bar        = $cookies->{'bar'};      # one way

   my %cookies    = %$cookies if $cookies;  # check, just to be safe
   my $baz        = $cookies{'baz'};        # another way

 httpd.conf:

   PerlInitHandler Apache::RequestNotes


 After using Apache::RequestNotes, $cookies contains a hashref with
 the names and values of all cookies sent back to your domain and
 path.  $input contains a reference to an Apache::Table object and
 can be accessed via Apache::Table methods.  If a form contains
 both GET and POST data, both are available via $input.

 Once the request is past the PerlInit phase, all other phases can
 have access to form input and cookie data without parsing it
 themselves. This relieves some strain, especially when the GET or 
 POST data is required by numerous handlers along the way.

NOTES

Apache::RequestNotes does not allow for file uploads. If either a 
file upload was attempted, or the POST data exceeds MaxPostSize,
rather than return SERVER_ERROR it sets $Apache::RequestNotes::err.

Verbose debugging is enabled by setting the variable
$Apache::RequestNotes::DEBUG=1 to or greater. To turn off all debug
information, set your apache LogLevel above info level.

This is alpha software, and as such has not been tested on multiple
platforms or environments.  It requires PERL_INIT=1, PERL_LOG_API=1, 
and maybe other hooks to function properly.  Doug MacEachern's 
libapreq is also required - you can get it from CPAN under the 
Apache tree.

FEATURES/BUGS

No known bugs or unexpected features at this time.

SEE ALSO

perl(1), mod_perl(1), Apache(3), libapreq(1), Apache::Table(3)

AUTHOR

Geoffrey Young <geoff@cpan.org>

COPYRIGHT

Copyright 2000 Geoffrey Young - all rights reserved.

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