GX::Class::Object - Universal base class for instantiable classes
package Person; use GX::Class::Object; has 'first_name' => ( isa => 'String', required => 1 ); has 'last_name' => ( isa => 'String', required => 1 ); build; my $person = Person->new( first_name => 'Peter', last_name => 'Venkman' ); print "Hello " . $person->first_name . "!";
This module provides the GX::Class::Object class which extends the GX::Class class.
new
Returns a new instance of the class.
$object = $class->new( %attributes );
%attributes ( named list )
%attributes
$object ( GX::Class::Object object )
$object
GX::Exception
clear
Resets the object's attributes to their uninitialized state.
$object->clear;
dump
Stringifies the object using Data::Dumper.
$string = $object->dump;
$string ( string )
$string
In void context, the resulting string is printed to STDERR.
STDERR
$object->dump;
meta
See GX::Class.
$meta = $class->meta; $meta = $object->meta;
import
$class->import( %arguments );
unimport
$class->unimport;
__build
Internal method.
$class->__build;
__build_clear_instance
$class->__build_clear_instance;
__build_initialize_instance
$class->__build_initialize_instance;
__clear_instance
$object->__clear_instance;
This method cannot be overridden.
__finalize
$object->__finalize( \%attributes );
__initialize
$object->__initialize( \%attributes );
__initialize_instance
$object->__initialize_instance( %attributes );
The following classes inherit directly from GX::Class::Object:
GX::Class::Singleton
GX::Class
GX::Meta
Jörg A. Uzarek <uzarek@runlevelnull.de>
Copyright (c) 2009-2011 Jörg A. Uzarek.
This module is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License Version 3 as published by the Free Software Foundation.
To install GX, copy and paste the appropriate command in to your terminal.
cpanm
cpanm GX
CPAN shell
perl -MCPAN -e shell install GX
For more information on module installation, please visit the detailed CPAN module installation guide.