From tadeusz.sosnierz w onet.pl Mon Nov 24 04:04:41 2014 From: tadeusz.sosnierz w onet.pl (=?UTF-8?B?VGFkZXVzeiBTb8Wbbmllcno=?=) Date: Mon, 24 Nov 2014 13:04:41 +0100 Subject: [Warszawa-pm] Spotkanie listopadowe/grudniowe Message-ID: <54731ED9.5010608@onet.pl> Nie sądzę, żeby udało się dwa, więc zrobiłem ogromną ankietę na całą resztę 2014 roku :) http://doodle.com/vzmxm527hsxcuhvx Pozdrawiam, Tadek From stas w datos.pl Wed Nov 26 03:28:56 2014 From: stas w datos.pl (Stanislaw Romanski) Date: Wed, 26 Nov 2014 12:28:56 +0100 Subject: [Warszawa-pm] Bug in Perl: Strange $_ inside 'for' nested in 'map' References: <54731ED9.5010608@onet.pl> Message-ID: Cześć, Muszę się pochwalić: znalazłem prawdziwy błąd w Perlu ! Oto w miarę minimalny przykład: ================================================= #!perl -w # test447.pl # With the commented-out instruction in the line 11 # - this code prints strange values for the table elements of indices 1 and 2. Why ? # Un-commenting the line 11 - or inserting any other instruction inside 'map' or 'for' # - makes the code to run properly. Bug or feature ? use strict; use warnings; map { # my $this_instruction_seems_to_be_completely_irrelevant = 111; for (my $i = 0; $i <= 0; $i++ ) { print "$_\n"; } } ('abc', 'def', 'ghi', 'jkl', 'mno'); ================================================= Opisałem to na LinkenIn, w grupie dyskusyjnel 'Perl' "Strange $_ inside 'for' nested in 'map' - bug or feature ?" i wysłałem perlbug report. Father Chrysostomos poprawił błąd i w wersji 5.22 pewnie błędu już nie będzie... A zagnieździł się począwszy od 5.8 - czyli jakieś 12 lat temu ;-) Pozdrawiam, Stanisław From tadeusz.sosnierz w onet.pl Wed Nov 26 03:56:05 2014 From: tadeusz.sosnierz w onet.pl (=?ISO-8859-2?Q?Tadeusz_So=B6nierz?=) Date: Wed, 26 Nov 2014 12:56:05 +0100 Subject: [Warszawa-pm] Bug in Perl: Strange $_ inside 'for' nested in 'map' In-Reply-To: References: <54731ED9.5010608@onet.pl> Message-ID: <5475BFD5.3050607@onet.pl> On 26.11.2014 12:28, Stanislaw Romanski wrote: > Cześć, > > Muszę się pochwalić: znalazłem prawdziwy błąd w Perlu ! > Oto w miarę minimalny przykład: > ================================================= > #!perl -w > # test447.pl > # With the commented-out instruction in the line 11 > # - this code prints strange values for the table elements of indices 1 > and 2. Why ? > # Un-commenting the line 11 - or inserting any other instruction inside > 'map' or 'for' > # - makes the code to run properly. Bug or feature ? > > use strict; > use warnings; > map { > # my $this_instruction_seems_to_be_completely_irrelevant = 111; > for (my $i = 0; $i <= 0; $i++ ) { > print "$_\n"; > } > } ('abc', 'def', 'ghi', 'jkl', 'mno'); > ================================================= Wow, ten zakomentowany kod który zmienia sytuację wygląda bardzo ciekawie :) Możesz podesłać link do fixa? Znalazłem Twój bug na http://www.nntp.perl.org/group/perl.perl5.porters/, ale nie mogę się nigdzie dopatrzyć rozwiązania. Pozdrawiam, Tadek From stas w datos.pl Wed Nov 26 07:08:40 2014 From: stas w datos.pl (Stanislaw Romanski) Date: Wed, 26 Nov 2014 16:08:40 +0100 Subject: [Warszawa-pm] Bug in Perl: Strange $_ inside 'for' nested in 'map' References: <54731ED9.5010608@onet.pl> <5475BFD5.3050607@onet.pl> Message-ID: <9FB68D1BCE3A44DC9CC72D01C707B82D@datos57604fe5b> Hej, Father Chrysostomos właśnie to naprawił - w commicie jest obszerny komentarz http://perl5.git.perl.org/perl.git/commitdiff/0f602692a Stanisław ----- Original Message ----- From: "Tadeusz Sośnierz" To: Sent: Wednesday, November 26, 2014 12:56 PM Subject: Re: [Warszawa-pm] Bug in Perl: Strange $_ inside 'for' nested in 'map' > On 26.11.2014 12:28, Stanislaw Romanski wrote: >> Cześć, >> >> Muszę się pochwalić: znalazłem prawdziwy błąd w Perlu ! >> Oto w miarę minimalny przykład: >> ================================================= >> #!perl -w >> # test447.pl >> # With the commented-out instruction in the line 11 >> # - this code prints strange values for the table elements of indices 1 >> and 2. Why ? >> # Un-commenting the line 11 - or inserting any other instruction inside >> 'map' or 'for' >> # - makes the code to run properly. Bug or feature ? >> >> use strict; >> use warnings; >> map { >> # my $this_instruction_seems_to_be_completely_irrelevant = 111; >> for (my $i = 0; $i <= 0; $i++ ) { >> print "$_\n"; >> } >> } ('abc', 'def', 'ghi', 'jkl', 'mno'); >> ================================================= > > Wow, ten zakomentowany kod który zmienia sytuację wygląda bardzo ciekawie > :) Możesz podesłać link do fixa? Znalazłem Twój bug na > http://www.nntp.perl.org/group/perl.perl5.porters/, ale nie mogę się > nigdzie dopatrzyć rozwiązania. > > Pozdrawiam, > Tadek > > _______________________________________________ > Warszawa-pm mailing list > Warszawa-pm w pm.org > http://mail.pm.org/mailman/listinfo/warszawa-pm >