NAME
Object - Basic object
SYNOPSIS
use App::Framework::Base::Object ;
DESCRIPTION
DIAGNOSTICS
Setting the debug flag to level 1 prints out (to STDOUT) some debug messages, setting it to level 2 prints out more verbose messages.
AUTHOR
Steve Price <sdprice at cpan.org>
BUGS
None that I know of!
INTERFACE
App::Framework::Base::Object->new([%args])
-
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.
App::Framework::Base::Object->init([%args])
-
Initialises the newly created object instance.
App::Framework::Base::Object->init_class([%args])
-
Initialises the object class variables.
App::Framework::Base::Object->add_fields($fields_href, $args_href)
-
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.
App::Framework::Base::Object->init_class_instance([%args])
-
Initialises the Run object class variables. Creates a class instance so that these methods can also be called via the class (don't need a specific instance)
App::Framework::Base::Object->debug(level)
-
Set debug print options to level.
0 = No debug 1 = standard debug information 2 = verbose debug information
App::Framework::Base::Object->verbose(level)
-
Set verbose print level to level.
0 = None verbose 1 = verbose information 2 = print commands 3 = print command results
App::Framework::Base::Object->strict_fields($flag)
-
Enable/disable strict field checking
App::Framework::Base::Object->class_instance([%args])
-
Returns an object that can be used for class-based calls - object contains all the usual fields
App::Framework::Base::Object->has_class_instance()
-
Returns true if this class has a class instance object
App::Framework::Base::Object->allowed_class_instance()
-
Returns true if this class can have a class instance object
App::Framework::Base::Object->field_list()
-
Returns hash of object's field definitions.
App::Framework::Base::Object->set(%args)
-
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).
App::Framework::Base::Object->vars([@names])
-
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.
App::Framework::Base::Object->DESTROY()
-
Destroy object
App::Framework::Base::Object->check_instance()
-
If this is not an instance (i.e. a class call), then if there is a class_instance defined use it, otherwise error.
App::Framework::Base::Object->copy_attributes($target)
-
Transfers all the supported attributes from $this object to $target object.
App::Framework::Base::Object->class()
-
Returns name of object class.
App::Framework::Base::Object->clone()
-
Create a copy of this object and return the copy.
App::Framework::Base::Object->quote_str($str)
-
Returns a quoted version of the string.
App::Framework::Base::Object->expand_vars($string, \%vars)
-
Run 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.
App::Framework::Base::Object->prt_data(@args)
-
Use App::Framework::Base::Object::DumpObj to print out variable information. Automatically enables object print out
App::Framework::Base::Object->dump_callstack()
-
Print out the call stack. Useful for debug output at a crash site.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 29:
=over without closing =back