The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
=begin pod

=TITLE class X::Redeclaration

    class X::Redeclaration does X::Comp { }

Thrown when a symbol (variable, routine, type, paramater, ...) is redeclared.
Note that redeclarations are generally fine in an inner scope, but if the
redeclaration appears in the same scope as the original declaration,
it usually indicates an error and is treated as one.

Examples

    my $x; my $x

    ===SORRY!===
    Redeclaration of symbol $x

    sub f() { }
    sub f() { }
    ===SORRY!===
    Redeclaration of routine f

But those are fine

    my $x;
    sub f() {
        my $x;          # not a redeclaration,
                        # because it's in an inner scope
        sub f() { };    # same
    }


=head1 Methods

=head2 symbol

Returns the name of the symbol that was redeclared.

=head1 what

Returns the kind of symbol that was redeclared. Usually C<symbol>, but can
also be C<routine>, C<type> etc.

=head1 postfix

Returns a string that is attached to the end of the error message. It
usually explains the particular problem in more detail, or suggests
way to fix the problem.

=end pod