You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by w trillich <wi...@pinncomp.net> on 2000/04/27 12:30:06 UTC

schwartzian

from his webtechniques article a while back--(source code
is available at www.webtechniques.com)... here's a slice from
r.schwartz's quickie DBIlogger--

$r->push_handlers (
  PerlLogHandler =>
  sub {
      my $orig = shift;
      my $r = $orig->last;
      my @data =
      (
          ht_time($orig->request_time, '%Y-%m-%d %H:%M:%S', 0),
          $r->get_remote_host,
          $r->method,
          # $orig->uri,
#$r->header_in('Host') .	# for virtual hosts?
          ($r->the_request =~ /^\S+\s+(\S+)/)[0],
          $r->connection->user,
          $r->header_in('Referer'),
          $r->header_in('User-agent'),
          $orig->status,
          $r->bytes_sent,
       );
...
   }
);


where would an intrepid innocent turn for details on what methods
and/or fields are available to the PerlLogHandler in the passed
arglist @_ array (okay, $_[0] or shift) ? 

apparently
->last and
->request_time and
->status
..and $_[0]->last has submethods including
	get_remote_host,
	method,
	the_request,
	header_in,
	bytes_sent
..what else is available, and what's the documentation called?