Class-GAPI
view release on metacpan or search on metacpan
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Class::GAPI - Generic API, Base class with autoloaded methods, stub objects, cloning etc.</title>
<link rev="made" href="mailto:gp@familiehaase.de" />
</head>
<body style="background-color: white">
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<ul>
<li><a href="#name">NAME</a></li>
<li><a href="#synopsis">SYNOPSIS</a></li>
<li><a href="#description">DESCRIPTION</a></li>
<li><a href="#autoloaded_methods">AUTOLOADED METHODS</a></li>
<li><a href="#object_initialization">OBJECT INITIALIZATION</a></li>
<li><a href="#other_functions">OTHER FUNCTIONS</a></li>
<li><a href="#notes">NOTES</a></li>
<li><a href="#author">AUTHOR</a></li>
<li><a href="#copyright_and_licence">COPYRIGHT AND LICENCE</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>Class::GAPI - Generic API, Base class with autoloaded methods, stub objects, cloning etc.</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
package Guppy ;</pre>
<pre>
use Class::GAPI ; # All of its cool stuff
our @ISA = qw(Class::GAPI) ; # is now in our namespace</pre>
<pre>
our @Children = qw(Class::GAPI::Fin Class::List::Eyeballs CGI) ; # Autoconstruct Subordinates
our @Default_Properties = qw(scaly small sushi) ; # Call at constructor time</pre>
<pre>
use strict ;
sub _init { # Last stage of initialization
my $self = shift ;
$self->fillet(1) if defined $self->{'sushi'}; # sushi exists but is undefined
return 1;
}
1 ;</pre>
<pre>
package Petstore ;
use Guppy ;
my $pet = Guppy->new(color => 'orange', price => '.50', small => 1, -sushi => 1) ; # envoke these functions
$pet->Eyeballs->[0] = "left" ; # Access a special list subclass
$pet->Eyeballs->[1] = "right" ; #
$pet->Fin->dorsal("polkadot") ; # Access a subordinate Class::GAPI object
$pet->Fin->tail("orange") ; #</pre>
<p>
( run in 1.203 second using v1.01-cache-2.11-cpan-119454b85a5 )