in reply to howto call an overridden sub

to call some method defined on any of the parent classes you can use the SUPER pseudo-package:
Package Foo ; use base qw(SomeGeneralSubs) ; sub close { my $obj = shift ; # its all OO # do something specific .... # now call close from 'SomeGeneralSubs' $obj->SUPER::close(...) } package SomeGeneralSubs ; sub close { .. }

Replies are listed 'Best First'.
Re^2: howto call an overridden sub
by jeanluca (Deacon) on Mar 27, 2006 at 09:37 UTC
    Ok, I assume when you have multiple super classes, like
    use base qw(A B C)
    it will first try A, then B, etc!

    Luca
      yes, it does a deep search on the hierarchy tree, so it first looks for the method in A, then in A parents, then in B, etc.