Apache-Wyrd
view release on metacpan or search on metacpan
Wyrd/DBL.pm view on Meta::CPAN
=item (void) C<log_event> (scalar)
same as log_bug, but don't send the output to STDERR. Instead, make it HTML escaped and store it for later dumping.
=cut
sub log_event {
my ($self, $value) = @_;
$self->{'dbl_log'} = [@{$self->{'dbl_log'}}, $value];
my $fh = $self->{'logfile'};
if ($fh) {
print $fh (Apache::Util::escape_html($value) . "<br>\n");
}
}
=pod
=item (hashref) C<base_class> (void)
return the base class of this set of Wyrds.
=cut
sub base_class {
my ($self) = @_;
return $self->{'base_class'};
}
=pod
=item (hashref) C<taint_exceptions> (void)
Which params are allowed to contain information that could be interpreted as a
Wyrd.
=cut
sub taint_exceptions {
my ($self) = @_;
return @{$self->{'taint_exceptions'} || []};
}
=pod
=item (hashref) C<globals> (void)
return a reference to the globals hashref Has a useful debugging message on unfound globals.
=cut
sub globals {
my ($self) = @_;
return $self->{'globals'};
}
=pod
=item (scalar) C<mtime> (void)
the modification time of the file currently being served. Derived from
Apache::Wyrd::Handler, by default compatible with the C<stat()> builtin
function.
=cut
sub mtime {
my ($self) = @_;
return $self->{'mtime'};
}
=item (scalar) C<size> (void)
the file size of the file currently being served. Derived from
Apache::Wyrd::Handler, by default compatible with the C<stat()> builtin
function.
=cut
sub size {
my ($self) = @_;
return $self->{'size'};
}
=pod
=item (scalar) C<dev> (void)
the device number of filesystem of the file currently being served. Derived
from Apache::Wyrd::Handler, by default compatible with the C<stat()> builtin
function.
=cut
sub dev {
my ($self) = @_;
return $self->{'dev'};
}
=pod
=item (scalar) C<ino> (void)
the inode number of the file currently being served. Derived from
Apache::Wyrd::Handler, by default compatible with the C<stat()> builtin
function.
=cut
sub ino {
my ($self) = @_;
return $self->{'ino'};
}
=pod
=item (scalar) C<mode> (void)
the file mode (type and permissions) of the file currently being served.
Derived from Apache::Wyrd::Handler, by default compatible with the C<stat()>
builtin function.
=cut
sub mode {
my ($self) = @_;
return $self->{'mode'};
}
=pod
=item (scalar) C<nlink> (void)
the number of (hard) links to the file of the file currently being served.
Derived from Apache::Wyrd::Handler, by default compatible with the C<stat()>
builtin function.
=cut
sub nlink {
my ($self) = @_;
return $self->{'nlink'};
}
=pod
=item (scalar) C<uid> (void)
the numeric user ID of file's owner of the file currently being served.
Derived from Apache::Wyrd::Handler, by default compatible with the C<stat()>
builtin function.
=cut
sub uid {
my ($self) = @_;
return $self->{'uid'};
}
=pod
=item (scalar) C<gid> (void)
the numeric group ID of file's owner of the file currently being served.
Derived from Apache::Wyrd::Handler, by default compatible with the C<stat()>
builtin function.
=cut
sub gid {
my ($self) = @_;
return $self->{'gid'};
}
=pod
=item (scalar) C<rdev> (void)
the the device identifier (special files only) of the file currently being
served. Derived from Apache::Wyrd::Handler, by default compatible with the
C<stat()> builtin function.
=cut
sub rdev {
my ($self) = @_;
return $self->{'rdev'};
}
=pod
=item (scalar) C<atime> (void)
the last access time in seconds since the epoch of the file currently being
served. Derived from Apache::Wyrd::Handler, by default compatible with the
C<stat()> builtin function.
=cut
sub atime {
my ($self) = @_;
return $self->{'atime'};
}
=pod
=item (scalar) C<ctime> (void)
the inode change time in seconds since the epoch of the file currently being
served. Derived from Apache::Wyrd::Handler, by default compatible with the
C<stat()> builtin function. See the perl documentation for details.
=cut
sub ctime {
my ($self) = @_;
return $self->{'ctime'};
}
=pod
=item (scalar) C<blksize> (void)
the preferred block size for file system I/O of the file currently being
served. Derived from Apache::Wyrd::Handler, by default compatible with the
C<stat()> builtin function.
=cut
sub blksize {
my ($self) = @_;
return $self->{'blksize'};
}
=pod
=item (scalar) C<blocks> (void)
the actual number of blocks allocated of the file currently being served.
Derived from Apache::Wyrd::Handler, by default compatible with the C<stat()>
builtin function.
=cut
sub blocks {
my ($self) = @_;
return $self->{'blocks'};
}
=pod
=item (variable) C<get_global> (scalar)
retrieve a global by name.
=cut
sub get_global {
my ($self, $name) = @_;
unless (exists($self->{'globals'}->{$name})) {
$self->log_bug("Asked to get global value $name which doesn't exist. Returning undef.");
return;
}
return $self->{'globals'}->{$name};
}
=pod
=item (void) set_global(scalar, scalar)
find the global by name and set it. Has a helpful debugging message on
undefined globals.
=cut
sub set_global {
my ($self, $name, $value) = @_;
unless (exists($self->{'globals'}->{$name})) {
$self->log_bug("Asked to set global value $name which doesn't exist. Creating it and setting it.");
}
$self->{'globals'}->{$name} = $value;
return;
}
=pod
=item (scalar) C<get_response> (void)
Return the response. Should be an Apache::Constants response code.
=cut
sub get_response {
my ($self) = @_;
return $self->{'response'};
}
=pod
( run in 1.742 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )