Class-GAPI

 view release on metacpan or  search on metacpan

GAPI.html  view on Meta::CPAN

<!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-&gt;fillet(1) if defined $self-&gt;{'sushi'}; # sushi exists but is undefined
                return 1;
        }
        1 ;</pre>
<pre>
        package Petstore ; 
        use Guppy        ; 
        my $pet = Guppy-&gt;new(color =&gt; 'orange', price =&gt; '.50', small =&gt; 1, -sushi =&gt; 1) ; # envoke these functions
        $pet-&gt;Eyeballs-&gt;[0] = &quot;left&quot;    ; # Access a special list subclass
        $pet-&gt;Eyeballs-&gt;[1] = &quot;right&quot;   ; # 
        $pet-&gt;Fin-&gt;dorsal(&quot;polkadot&quot;)   ; # Access a subordinate Class::GAPI object
        $pet-&gt;Fin-&gt;tail(&quot;orange&quot;)       ; #</pre>
<p>



( run in 1.203 second using v1.01-cache-2.11-cpan-119454b85a5 )