On Wed, Jul 13, 2005 at 04:29:53PM -0700, Michael G Schwern wrote: > I don't see the utility of the current behavior, except maybe it was easier > to implement, and IMHO its ripe for mistakes like the one pointed out > earlier: > use strict; > package Foo; > our @ISA = qw(Foo); > package Bar; > @ISA = qw(Baz); > print @ISA; # Hmm, everything looks ok. > print @Foo::ISA; # SURPRISE! > print @Bar::ISA; > No warnings issued and strict won't save you.
1) Fix @ISA, or 2) Introduce real package scopes: package Foo { our @ISA = ...; ... } Not completely dissimilar to: package Foo; { our @ISA = ...; ... } our() was never a problem for me, and if it is changed, some of my code may break. I always prefer lexicals over global variables. Consider code like: our($MY_GLOBAL); ... { package SOME_OTHER_PACKAGE; $MY_GLOBAL = $VAR_FROM_OTHER_PACKAGE; ... }; Cheers, mark -- [EMAIL PROTECTED] / [EMAIL PROTECTED] / [EMAIL PROTECTED] __________________________ . . _ ._ . . .__ . . ._. .__ . . . .__ | Neighbourhood Coder |\/| |_| |_| |/ |_ |\/| | |_ | |/ |_ | | | | | | \ | \ |__ . | | .|. |__ |__ | \ |__ | Ottawa, Ontario, Canada One ring to rule them all, one ring to find them, one ring to bring them all and in the darkness bind them... http://mark.mielke.cc/