GX::Class::Object

Module Version: 0.2000_01

NAME

GX::Class::Object - Universal base class for instantiable classes

SYNOPSIS

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 . "!";

DESCRIPTION

This module provides the GX::Class::Object class which extends the GX::Class class.

METHODS

Constructor

new

Returns a new instance of the class.

$object = $class->new( %attributes );
Arguments:
  • %attributes ( named list )
Returns:
Exceptions:

Public Methods

clear

Resets the object's attributes to their uninitialized state.

$object->clear;

dump

Stringifies the object using Data::Dumper.

$string = $object->dump;
Returns:
  • $string ( string )

In void context, the resulting string is printed to STDERR.

$object->dump;

meta

See GX::Class.

$meta = $class->meta;
$meta = $object->meta;

Internal Methods

import

See GX::Class.

$class->import( %arguments );

unimport

See GX::Class.

$class->unimport;

__build

Internal method.

$class->__build;

__build_clear_instance

Internal method.

$class->__build_clear_instance;

__build_initialize_instance

Internal method.

$class->__build_initialize_instance;

__clear_instance

Internal method.

$object->__clear_instance;

This method cannot be overridden.

__finalize

Internal method.

$object->__finalize( \%attributes );

__initialize

Internal method.

$object->__initialize( \%attributes );

__initialize_instance

Internal method.

$object->__initialize_instance( %attributes );

This method cannot be overridden.

EXPORTS

See GX::Class.

SUBCLASSES

The following classes inherit directly from GX::Class::Object:

AUTHOR

Jörg A. Uzarek <uzarek@runlevelnull.de>

COPYRIGHT AND LICENSE

Copyright © 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.