PET::Util

Base class for all Util modules.  PET::Dispatcher makes this class inherit all configured modules.

Summary
PET::UtilBase class for all Util modules.
Variables
$Disp
$Log
Functions
new($DISP_in)Guess what...
getRealRemoteHost()Returns the remote host (if empty, then looks for forwarded proxy header)
init
NAMEMust be overriden in subclasses!
toBytesKMCreates “bytes” value (an integer) from symbolic notation (e.g.
loadFile ($file)Loads a file.
saveFile ($file, $content)Loads a file.

Variables

$Disp

our $Disp

$Log

our $Log

Functions

new($DISP_in)

sub new

Guess what...

Parameters

$DISP_in is an instance of PET::Dispatcher,

getRealRemoteHost()

sub getRealRemoteHost

Returns the remote host (if empty, then looks for forwarded proxy header)

init

sub init

NAME

sub NAME

Must be overriden in subclasses!

toBytesKM

sub toBytesKM

Creates “bytes” value (an integer) from symbolic notation (e.g.  4k => 4096) This can also be calles as a class method!!!!!!!!!

loadFile ($file)

sub loadFile

Loads a file.  Returns a scalarref if succeful, or a scaler with an error message if there was an error.  Doesn’t log.

saveFile ($file, $content)

sub saveFile

Loads a file.  Returns undef (success) or error message.  Doesn’t log.

PET Util package for manipulating HTML -- mostly forms.
Various methods that generate/handle images.
General IO class, mostly to simplify file and directory access.
A special multilingual implementation for HTML pages using (My)SQL.
our $Disp
our $Log
sub new
Guess what...
sub getRealRemoteHost
Returns the remote host (if empty, then looks for forwarded proxy header)
sub init
sub NAME
Must be overriden in subclasses!
sub toBytesKM
Creates “bytes” value (an integer) from symbolic notation (e.g.
sub loadFile
Loads a file.
sub saveFile
Loads a file.
Close