RE: schwartzian

2000-04-27 Thread Eric Cholet

> 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?

$_[0] is the request record, all these methods are Apache methods,
'perldoc Apache' will give you the documentation for them.
->last is a pointer to the last subrequest in the request chain.
Also see http://www.modperl.com/book/chapters/ch9.html but be aware
that the perldoc is more up to date.

--
Eric




schwartzian

2000-04-27 Thread w trillich

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?