NAME
Simran::Base - This is the base class for all modules in the Simran:: area.
SYNOPSIS
DESCRIPTION
This class should never be instantiated directly.
You should only be inheriting from it.
METHODS
new
- Description
-
Provide a standard
"new"
method
for
all classes that inherit from this class.
- Input
-
* A HASH of name/value pairs you want to set as properties
A property can be referenced as such (
after
being set):
$object
->{property_name};
(the properties are set via the _init method)
Note: This new method calls
$self
->_init(
@_
) and expects
'1'
or
'undef'
depending on
if
the _init was successful
- Return
-
* An Object -
if
all was well
undef
- otherwise
- Method Type
-
* This method should be used as a class method only
setError
- Description
-
This method sets the error to the message that you provide for the calling module.
- Input
-
*
@errors
- Error Messages
- Return
-
*
undef
- This function returns
undef
so you can
do
things like:
return
$self
->setError(
"No User Specified"
);
in your code.
- Note
-
* Sets the variable Your::Class::Name::_ErrorMessages although this variable
should never be used directly.
- Method Type
-
* This method can be used as a class or object method
getError
- Description
-
This method returns the last error message for the calling module...
- Input
-
* None
- Return
-
*
@errors
- Errors as set by setError
- Method Type
-
* This method can be used as a class or object method
strip
- Description
-
Strips out leading and training whitespaces from references...
- Input
-
* Reference to an array, hash or string
or
A string
- Return
-
* If input was a reference then, None - The reference passed as input is modified...
Else, the stripped string
- Method Type
-
* This method can be used as a class or object method
AUTHOR
Simran, <simran@cse.unsw.edu.au>
COPYRIGHT AND LICENSE
Copyright 2002 by simran
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.