"Brandon Black" <blblack gmail.com> wrote:
:[...] The behavior of the current base
:and the proposed change is different even without
exceptions (although
:in ways you wouldn't think a sane module would care about,
but
:still...). When you do the following with the current
base.pm:
:
:perl -wle 'package AA; ISA=(); package BB; use
base qw/AA/; package
:CC; use base qw/BB AA/; package main; print join(q{,}, CC::ISA)'
:
:It prints just "BB". CC::ISA does not contain
"AA" even though it
:was explicitly asked for. This is due to the "next
if
:$inheritor->isa($base)" line. With the proposed
push-all-at-once
:logic, CC::ISA would instead be qw/BB AA/ as asked for.
I think that could be fixed just by replacing the check
with:
next if grep $_->isa($base), ($inheritor, isa_classes);
Hugo
|