Apache-RequestNotes

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

parse request data and puts references to the data objects in pnotes.

EXAMPLE

httpd.conf:

  PerlInitHandler Apache::RequestNotes

some Perl*Handler or Registry script:

  my $input      = $r->pnotes('INPUT');   # Apache::Table reference
  my $uploads    = $r->pnotes('UPLOADS'); # Apache::Upload array ref
  my $cookies    = $r->pnotes('COOKIES'); # hash reference
  
  # GET and POST data
  my $foo        = $input->get('foo');

  # uploaded files
  foreach my $upload (@$uploads) {
    my $name     = $upload->name'
    my $fh       = $upload->fh;

RequestNotes.pm  view on Meta::CPAN


  foreach my $upload (@uploads) {
    $log->info("\tupload: size = ", $upload->size,
       ", type = ", $upload->type) if $Apache::RequestNotes::DEBUG; 
  }

#---------------------------------------------------------------------
# put the form and cookie data in a pnote for access by other handlers
#---------------------------------------------------------------------

  $r->pnotes(INPUT => $input);
  $r->pnotes(UPLOADS => \@uploads) if @uploads;
  $r->pnotes(COOKIES => \%cookies) if %cookies;

#---------------------------------------------------------------------
# wrap up...
#---------------------------------------------------------------------

  $log->info("Exiting Apache::RequestNotes");

  return OK;

RequestNotes.pm  view on Meta::CPAN

parse request data and puts references to the data objects in pnotes.

=head1 EXAMPLE

httpd.conf:

  PerlInitHandler Apache::RequestNotes

some Perl*Handler or Registry script:

  my $input      = $r->pnotes('INPUT');   # Apache::Table reference
  my $uploads    = $r->pnotes('UPLOADS'); # Apache::Upload array ref
  my $cookies    = $r->pnotes('COOKIES'); # hash reference
  
  # GET and POST data
  my $foo        = $input->get('foo');

  # uploaded files
  foreach my $upload (@$uploads) {
    my $name     = $upload->name'
    my $fh       = $upload->fh;



( run in 0.844 second using v1.01-cache-2.11-cpan-4e96b696675 )