base - Establish IS-A relationship with base class at compile time
package Baz; use base qw(Foo Bar);
Roughly similar in effect to
BEGIN { require Foo; require Bar; push @ISA, qw(Foo Bar); }
Will also initialize the %FIELDS
hash if one of the base
classes has it. Multiple inheritance of %FIELDS
is not
supported. The 'base' pragma will croak if multiple base classes has a
%FIELDS
hash. See
the fields manpage for a description of this feature.
When strict 'vars' is in scope base also let you assign to @ISA
without having to declare
@ISA
with the 'vars' pragma first.
This module was introduced with Perl 5.004_04.
If rather than formatting bugs, you encounter substantive content errors in these documents, such as mistakes in the explanations or code, please use the perlbug utility included with the Perl distribution.