Object - Basic object
use App::Framework::Base::Object ;
Setting the debug flag to level 1 prints out (to STDOUT) some debug messages, setting it to level 2 prints out more verbose messages.
Steve Price <sdprice at cpan.org>
<sdprice at cpan.org>
None that I know of!
Create a new object.
The %args are specified as they would be in the set method, for example:
'mmap_handler' => $mmap_handler
Special arguments are:
'fields' => Either ARRAY list of valid field names, or HASH of field names with default values
Example:
new( 'fields' => { 'cmd' => undef, 'status' => 0, 'results' => [], ) )
All defined fields have an accessor method created.
Initialises the newly created object instance.
Initialises the object class variables.
Adds the contents of the HASH ref $fields_href to the args HASH ref ($args_href) under the key 'fields'. Used by derived objects to add their fields to the parent object's fields.
Initialises the object class variables. Creates a class instance so that these methods can also be called via the class (don't need a specific instance)
Set global debug print options to level.
0 = No debug 1 = standard debug information 2 = verbose debug information
Set global verbose print level to level.
0 = None verbose 1 = verbose information 2 = print commands 3 = print command results
Enable/disable strict field checking
Returns an object that can be used for class-based calls - object contains all the usual fields
Returns true if this class has a class instance object
Returns true if this class can have a class instance object
Returns hash of object's field definitions.
Set debug print options to level.
Set debug print options flag to undefined.
Set verbose print options to level.
Set verbose print options flag to undefined.
Get/set a field value. Used by derived objects to get/set the underlying object field variable when they have overridden that field's access method.
Set one or more settable parameter.
The %args are specified as a hash, for example
set('mmap_handler' => $mmap_handler)
Sets field values. Field values are expressed as part of the HASH (i.e. normal field => value pairs).
Returns hash of object's fields (i.e. field name => field value pairs).
If @names array is specified, then only returns the HASH containing the named fields.
Destroy object
If this is not an instance (i.e. a class call), then if there is a class_instance defined use it, otherwise error.
Transfers all the supported attributes from $this object to $target object.
Returns name of object class.
Create a copy of this object and return the copy.
Returns a quoted version of the string.
Work through string expanding any variables, replacing them with the value stored in the %vars hash. If variable is not stored in %vars, then that variable is left.
Returns expanded string.
Use App::Framework::Base::Object::DumpObj to print out variable information. Automatically enables object print out
Print out the call stack. Useful for debug output at a crash site.
To install App::Framework, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Framework
CPAN shell
perl -MCPAN -e shell install App::Framework
For more information on module installation, please visit the detailed CPAN module installation guide.