GX::Class - Universal base class
package My::Class; use GX::Class; # ... 1;
This module provides the GX::Class class.
meta
Returns the GX::Meta::Class metaobject that represents the class.
$meta = $class->meta;
$meta ( GX::Meta::Class object )
$meta
import
Internal method.
$class->import( %arguments );
code_attributes ( ARRAY reference )
code_attributes
ARRAY
A reference to an array containing the allowed code attributes. The given code attributes must be simple names. See attributes for details.
extends ( string | ARRAY reference )
extends
A class name or a reference to an array containing class names. See extends() below.
extends()
meta ( GX::Meta::Class object )
The class metaobject to associate with the class.
superclass ( string )
superclass
A class name. Prepended to the @ISA array of the class before the classes specified by extends.
@ISA
with ( string | ARRAY reference )
with
A package name or a reference to an array containing package names. See with() below.
with()
unimport
$class->unimport;
The following functions / keywords are exported by default.
build
Builds the class.
build;
If this function is called, it MUST be called after the class has been completely defined but before any derived classes are loaded.
Loads the specified classes (if found in @INC) and prepends them to the @ISA array of the class.
@INC
extends @superclasses;
@superclasses ( strings )
@superclasses
A list of class names.
has
Declares an attribute.
has $attribute_name => %attribute_properties;
$attribute_name ( string )
$attribute_name
The name of the attribute.
%attribute_properties ( named list ) [ optional ]
%attribute_properties
The attribute properties. See GX::Meta::Attribute for details.
static
A modifier for has() that makes the respective attribute static.
has()
has static $attribute_name => %attribute_properties;
Mixes the specified classes / packages into the class.
with @mixins;
@mixins ( strings )
@mixins
A list of class / package names.
The following classes inherit directly from GX::Class:
GX::Class::Object
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.