NAME

base - Establish IS-A relationship with base class at compile time


SYNOPSIS

    package Baz;
    use base qw(Foo Bar);


DESCRIPTION

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.


SEE ALSO

the fields manpage


DISCLAIMER

We are painfully aware that these documents may contain incorrect links and misformatted HTML. Such bugs lie in the automatic translation process that automatically created the hundreds and hundreds of separate documents that you find here. Please do not report link or formatting bugs, because we cannot fix per-document problems. The only bug reports that will help us are those that supply working patches to the installhtml or pod2html programs, or to the Pod::HTML module itself, for which I and the entire Perl community will shower you with thanks and praises.

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.

--Tom Christiansen, Perl Documentation Compiler and Editor


Return to the Perl Documentation Index.
Return to the Perl Home Page.