2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml">
5 <title>base - Establish IS-A relationship with base classes at compile time
</title>
6 <meta http-equiv=
"content-type" content=
"text/html; charset=utf-8" />
7 <link rev=
"made" href=
"mailto:" />
10 <body style=
"background-color: white">
11 <table border=
"0" width=
"100%" cellspacing=
"0" cellpadding=
"3">
12 <tr><td class=
"block" style=
"background-color: #cccccc" valign=
"middle">
13 <big><strong><span class=
"block"> base - Establish IS-A relationship with base classes at compile time
</span></strong></big>
17 <p><a name=
"__index__"></a></p>
22 <li><a href=
"#name">NAME
</a></li>
23 <li><a href=
"#synopsis">SYNOPSIS
</a></li>
24 <li><a href=
"#description">DESCRIPTION
</a></li>
25 <li><a href=
"#diagnostics">DIAGNOSTICS
</a></li>
26 <li><a href=
"#history">HISTORY
</a></li>
27 <li><a href=
"#caveats">CAVEATS
</a></li>
28 <li><a href=
"#see_also">SEE ALSO
</a></li>
35 <h1><a name=
"name">NAME
</a></h1>
36 <p>base - Establish IS-A relationship with base classes at compile time
</p>
40 <h1><a name=
"synopsis">SYNOPSIS
</a></h1>
43 use base qw(Foo Bar);
</pre>
47 <h1><a name=
"description">DESCRIPTION
</a></h1>
48 <p>Allows you to both load one or more modules, while setting up inheritance from
49 those modules at the same time. Roughly similar in effect to
</p>
55 push @ISA, qw(Foo Bar);
57 <p>If any of the listed modules are not loaded yet,
<em>base
</em> silently attempts to
58 <a href=
"file://C|\msysgit\mingw\html/pod/perlfunc.html#item_require"><code>require
</code></a> them (and silently continues if the
<a href=
"file://C|\msysgit\mingw\html/pod/perlfunc.html#item_require"><code>require
</code></a> failed). Whether to
59 <a href=
"file://C|\msysgit\mingw\html/pod/perlfunc.html#item_require"><code>require
</code></a> a base class module is determined by the absence of a global variable
60 $VERSION in the base package. If $VERSION is not detected even after loading
61 it,
<base
> will define $VERSION in the base package, setting it to the string
62 <code>-
1, set by base.pm
</code>.
</p>
63 <p>Will also initialize the fields if one of the base classes has it.
64 Multiple inheritence of fields is
<strong>NOT
</strong> supported, if two or more
65 base classes each have inheritable fields the 'base' pragma will
66 croak. See
<a href=
"file://C|\msysgit\mingw\html/lib/fields.html">the fields manpage
</a>,
<em>public
</em> and
<em>protected
</em> for a description of
71 <h1><a name=
"diagnostics">DIAGNOSTICS
</a></h1>
73 <dt><strong><a name=
"item_base_class_package__22_25s_22_is_empty_2e">Base class package ``%s'' is empty.
</a></strong>
76 <p>base.pm was unable to require the base package, because it was not
77 found in your path.
</p>
84 <h1><a name=
"history">HISTORY
</a></h1>
85 <p>This module was introduced with Perl
5.004_04.
</p>
89 <h1><a name=
"caveats">CAVEATS
</a></h1>
90 <p>Due to the limitations of the implementation, you must use
91 base
<em>before
</em> you declare any of your own fields.
</p>
95 <h1><a name=
"see_also">SEE ALSO
</a></h1>
96 <p><a href=
"file://C|\msysgit\mingw\html/lib/fields.html">the fields manpage
</a></p>
97 <table border=
"0" width=
"100%" cellspacing=
"0" cellpadding=
"3">
98 <tr><td class=
"block" style=
"background-color: #cccccc" valign=
"middle">
99 <big><strong><span class=
"block"> base - Establish IS-A relationship with base classes at compile time
</span></strong></big>