Re: base pragma (was: Re: [PATCH bleadperl] Re: [perl #2915] my $x; our $x; does not give "masked" warning)

2005-07-21 Thread Michael G Schwern
On Wed, Jul 20, 2005 at 11:33:01PM -0400, Randy W. Sims wrote: > >"use base" sucks. It uses horrible heuristics to do its thing and gets > >things wrong disturbingly often. IMO its much preferable to avoid it. > >As an example play around with it with multiple packages in a single > >file, likewise

base pragma (was: Re: [PATCH bleadperl] Re: [perl #2915] my $x; our $x; does not give "masked" warning)

2005-07-20 Thread Randy W. Sims
demerphq wrote: On 7/14/05, Johan Vromans <[EMAIL PROTECTED]> wrote: Rick Delaney <[EMAIL PROTECTED]> writes: use strict; package Foo::Bar; our @ISA = qw(Foo); package Foo::Baz; our @ISA = qw(Foo); This is where we have "use base" for. "use base" sucks. It uses horrible

Re: [PATCH bleadperl] Re: [perl #2915] my $x; our $x; does not give "masked" warning

2005-07-20 Thread demerphq
On 7/14/05, Johan Vromans <[EMAIL PROTECTED]> wrote: > Rick Delaney <[EMAIL PROTECTED]> writes: > > > use strict; > > package Foo::Bar; > > our @ISA = qw(Foo); > > > > package Foo::Baz; > > our @ISA = qw(Foo); > > This is where we have "use base" for. "use base" sucks. It use

Re: [PATCH bleadperl] Re: [perl #2915] my $x; our $x; does not give "masked" warning

2005-07-19 Thread Michael G Schwern
On Tue, Jul 19, 2005 at 12:17:43PM +0200, Rafael Garcia-Suarez wrote: > I think the "our variable redeclared" warning can be extended to the case > > our $x; our $x; > > but specifically not to the case > > our $x; package X; our $x; > > since in this latest case the 2nd $x is bound to

Re: [PATCH bleadperl] Re: [perl #2915] my $x; our $x; does not give "masked" warning

2005-07-19 Thread Rick Delaney
On Tue, Jul 19, 2005 at 12:17:43PM +0200, Rafael Garcia-Suarez wrote: > > I think the "our variable redeclared" warning can be extended to the case > > our $x; our $x; > > but specifically not to the case > > our $x; package X; our $x; > > since in this latest case the 2nd $x is bound

Re: [PATCH bleadperl] Re: [perl #2915] my $x; our $x; does not give "masked" warning

2005-07-19 Thread Rafael Garcia-Suarez
On 7/13/05, Rick Delaney <[EMAIL PROTECTED]> wrote: > I agree too. The following patch will make the first case warn too. > Note that it also changes this current behaviour: > > % perl -wle 'our $p; package X; our $p;' > % perl -wle 'our $p; package X; my $p;' > "my" variable $p masks

Re: [PATCH bleadperl] Re: [perl #2915] my $x; our $x; does not give "masked" warning

2005-07-14 Thread Rick Delaney
On Thu, Jul 14, 2005 at 09:21:50AM -0700, Randal L. Schwartz wrote: > > "Rick" == Rick Delaney <[EMAIL PROTECTED]> writes: > Rick> Whatever, it was just an example. Can we get this bug resolved, > Rick> please? > > By "resolved", you mean "my $x; our $x;" needs masking warning, not > that the

Re: [PATCH bleadperl] Re: [perl #2915] my $x; our $x; does not give "masked" warning

2005-07-14 Thread Randal L. Schwartz
> "Rick" == Rick Delaney <[EMAIL PROTECTED]> writes: Rick> On Thu, Jul 14, 2005 at 02:05:26PM +0200, Johan Vromans wrote: >> >> This is where we have "use base" for. Rick> Whatever, it was just an example. Can we get this bug resolved, Rick> please? By "resolved", you mean "my $x; our $x;"

Re: [PATCH bleadperl] Re: [perl #2915] my $x; our $x; does not give "masked" warning

2005-07-14 Thread Rick Delaney
On Thu, Jul 14, 2005 at 02:05:26PM +0200, Johan Vromans wrote: > > This is where we have "use base" for. Whatever, it was just an example. Can we get this bug resolved, please? -- Rick Delaney [EMAIL PROTECTED]

Re: [PATCH bleadperl] Re: [perl #2915] my $x; our $x; does not give "masked" warning

2005-07-14 Thread Johan Vromans
Rick Delaney <[EMAIL PROTECTED]> writes: > use strict; > package Foo::Bar; > our @ISA = qw(Foo); > > package Foo::Baz; > our @ISA = qw(Foo); This is where we have "use base" for. -- Johan

Re: [PATCH bleadperl] Re: [perl #2915] my $x; our $x; does not give "masked" warning

2005-07-13 Thread Rick Delaney
On Wed, Jul 13, 2005 at 02:01:40PM -0700, Michael G Schwern wrote: > On Wed, Jul 13, 2005 at 02:15:49AM -0400, Rick Delaney wrote: > > I agree too. The following patch will make the first case warn too. > > Note that it also changes this current behaviour: > > > > % perl -wle 'our $p; package

Re: [PATCH bleadperl] Re: [perl #2915] my $x; our $x; does not give "masked" warning

2005-07-13 Thread Michael G Schwern
On Wed, Jul 13, 2005 at 02:15:49AM -0400, Rick Delaney wrote: > I agree too. The following patch will make the first case warn too. > Note that it also changes this current behaviour: > > % perl -wle 'our $p; package X; our $p;' > % perl -wle 'our $p; package X; my $p;' > "my"

[PATCH bleadperl] Re: [perl #2915] my $x; our $x; does not give "masked" warning

2005-07-12 Thread Rick Delaney
On Tue, Jul 12, 2005 at 08:29:58PM -0700, Michael G Schwern via RT wrote: > > This is still an issue in 5.9.x. I'd agree, there should be a warning > particularly because all other combinations issue a warning: > > $ bleadperl -lwe 'my $x = 42; our $x = 23; print $x' > 23 > $ bleadperl -lwe 'my

[perl #2915] my $x; our $x; does not give "masked" warning

2005-07-12 Thread Michael G Schwern via RT
> [EMAIL PROTECTED] - Thu Mar 30 21:52:59 2000]: > > Shouldn't > > perl5.6.0 -we 'my $x; our $x; $x=0' > > generate some sort of "redeclared" warning?The other cases > (two "my"s or two "our"s or "our" before "my") all do. This is still an issue in 5.9.x. I'd agree, there should be a w