Re: %^H

2002-03-29 Thread Rafael Garcia-Suarez
On 2002.03.29 00:15 Mark-Jason Dominus wrote: > > Why doesn't PL_hints default to having HINT_LOCALIZE_HH set? > > The purpose of %^H was to implement new lexically-scoped pragmas. But > as it stands, it is not useful for that, because in > >

Re: [PATCH] hints part I : $^H

2002-12-13 Thread H.Merijn Brand
On Fri 13 Dec 2002 14:50, Rafael Garcia-Suarez <[EMAIL PROTECTED]> wrote: > "H.Merijn Brand" <[EMAIL PROTECTED]> wrote: > > > Thats true, but would it be possible for a sub to obtain the ${^HINTS} > > > for the lexical scope of its caller ? That could be useful. > > > > Ahhh, to change it > > Pe

Re: [PATCH] hints part I : $^H

2002-12-13 Thread Rafael Garcia-Suarez
"H.Merijn Brand" <[EMAIL PROTECTED]> wrote: > On Fri 13 Dec 2002 14:50, Rafael Garcia-Suarez <[EMAIL PROTECTED]> >wrote: > > "H.Merijn Brand" <[EMAIL PROTECTED]> wrote: > > > > Thats true, but would it be possible for a sub to obtain the ${^HINTS} > > > > for the lexical scope of its caller ? That

[perl #31865] weird results from reverse( %x = reverse %h )

2004-10-06 Thread via RT
of perlbug 1.35 running under perl v5.8.4. - [Please enter your report here] lisa:~ borisz$ perl -MData::Dumper -le '%h = (1 => 2, a=>"b", c => 2); %h = reverse ( %x = reverse %h); print Dumper({

Re: [ID 20020427.004] %^H feature broken between 5.6.0 and 5.6.1

2002-04-29 Thread Andreas J. Koenig
> On Mon, 29 Apr 2002 09:49:59 +0200, [EMAIL PROTECTED] (Andreas J. Koenig) >said: > On Mon, 29 Apr 2002 09:27:06 +0200, Rafael Garcia-Suarez ><[EMAIL PROTECTED]> said: >> I'd like to have this fixed for 5.8, but I'd like to know which >> patch introduced the error between 5.6.0 and 5

Re: [ID 20020427.004] %^H feature broken between 5.6.0 and 5.6.1

2002-04-29 Thread Rafael Garcia-Suarez
Andreas J. Koenig wrote: > > 8858 got the guilty ticket. > Thanks! Funny thing, I see in the Changes file : "Fixed %^H scoping bug". -- Rafael Garcia-Suarez

Re: [perl #31865] weird results from reverse( %x = reverse %h )

2004-10-06 Thread Rafael Garcia-Suarez
Boris Zentner (via RT) wrote: > lisa:~ borisz$ perl -MData::Dumper -le '%h = (1 => 2, a=>"b", c => 2); > %h = reverse ( %x = reverse %h); print Dumper({x => \%x, h =>\%h});' > $VAR1 = { >'h' => { >

Re: [perl #31865] weird results from reverse( %x = reverse %h )

2004-10-06 Thread Rick Delaney
On Wed, Oct 06, 2004 at 06:50:17PM +0200, Rafael Garcia-Suarez wrote: > Boris Zentner (via RT) wrote: > > lisa:~ borisz$ perl -MData::Dumper -le '%h = (1 => 2, a=>"b", c => 2); > > %h = reverse ( %x = reverse %h); print Dumper({x => \%x, h

Re: [perl #31865] weird results from reverse( %x = reverse %h )

2004-10-06 Thread Graham Barr
On 6 Oct 2004, at 17:50, Rafael Garcia-Suarez wrote: Boris Zentner (via RT) wrote: lisa:~ borisz$ perl -MData::Dumper -le '%h = (1 => 2, a=>"b", c => 2); %h = reverse ( %x = reverse %h); print Dumper({x => \%x, h =>\%h});' $VAR1 = { &

RE: [perl #31865] weird results from reverse( %x = reverse %h )

2004-10-06 Thread Orton, Yves
> I dunno, but some more data points: > > $ perl5.8.3 -le 'print (%x = ("a",1,"b",2,"b",3));' > bb > $ perl5.6.1 -le 'print (%x = ("a",1,"b",2,"b",3));' > a1bb3 > > I'm not sure what it should print but those are both obviously wrong. Maybe its also OS specific? On Win32 I could

RE: [perl #31865] weird results from reverse( %x = reverse %h )

2004-10-06 Thread Orton, Yves
r versions: D:\Development>perl5.6.1 -MData::Dumper -le "%h = (1 => 2, a=>'b', c => 2); %h = reverse ( %x = reverse %h); pr int Dumper({x => \%x, h =>\%h});" $VAR1 = { 'h' => { '' => 2,

Re: [perl #31865] weird results from reverse( %x = reverse %h )

2004-10-06 Thread Rick Delaney
On Wed, Oct 06, 2004 at 06:58:58PM +0100, Graham Barr wrote: > > But reading the code it seems to me that the code above would not do > what the user expected anyway. The code in pp_aassign looks like it is > trying to do the same thing regardless of the LHS being an array or a > hash. So it wo

Re: [perl #31865] weird results from reverse( %x = reverse %h )

2004-10-06 Thread Rick Delaney
On Wed, Oct 06, 2004 at 07:00:59PM +0100, Orton, Yves wrote: > > > I dunno, but some more data points: > > > > $ perl5.8.3 -le 'print (%x = ("a",1,"b",2,"b",3));' > > bb > > $ perl5.6.1 -le 'print (%x = ("a",1,"b",2,"b",3));' > > a1bb3 > > > > I'm not sure what it should print bu

RE: [perl #31865] weird results from reverse( %x = reverse %h )

2004-10-06 Thread Orton, Yves
> > D:\Development>perl -le "print (%x = (qw(a 1 b 2 c 3)));" >^ >b in my example > > a1b2c3 > > The required trigger is a duplicate key which you don't have in your > trials. Whoops. So I didn

Re: [perl #31865] weird results from reverse( %x = reverse %h )

2004-10-06 Thread Graham Barr
On 6 Oct 2004, at 19:11, Rick Delaney wrote: On Wed, Oct 06, 2004 at 06:58:58PM +0100, Graham Barr wrote: But reading the code it seems to me that the code above would not do what the user expected anyway. The code in pp_aassign looks like it is trying to do the same thing regardless of the LHS bei

Re: [perl #31865] weird results from reverse( %x = reverse %h )

2004-10-08 Thread David Nicol
here's the arguably obvious workaround, since the bug applies to the list returned from assignment of a list to a hash, don't use assignment-of-an-array-to-a-hash as an rvalue. One assumes that Boris did this to get the result he wanted. $ perl -MData::Dumper -le '%h = (1 =>

Re: [PATCH perl-current] Lexical scoping of %^H broken in 5.6.0 & bleedperl

2000-07-12 Thread Alan Burlison
' && namend[1])) > { > if (!stash) > - stash = PL_defstash; > + stash = (PL_nsstash) ? PL_nsstash : PL_defstash; At the moment the code looks up what you have called PL_nsstash and stores it in a variable inside yylex. This lookup is done ever

[PATCH] RE: [perl #22599] Strange behaviour when combining foreac h and printf

2003-06-11 Thread Robin Barker
The attached patch causes a warning to be issued if the string to be left-justified by s?printf contains a newline. I have put the warning in the existing printf class: perhaps it should be in a new class. Robin -Original Message- From: Robin Barker [mailto:[EMAIL PROTECTED] Sent: 06 Jun