-
Notifications
You must be signed in to change notification settings - Fork 558
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dangerous behavior from local #850
Comments
From pimlott@idiomtech.comA coworker accidentally did: { This did not localize $/ . I don't know what it did do. There was no Thanks, Perl Info
|
From [Unknown Contact. See original ticket]On Sun, 14 Nov 1999, Andrew Pimlott wrote:
It looks to me as if it did localize $/ -- but only _after_ storing undef
Or, better yet, could perl simply Do The Right Thing? -- |
From @tamiasOn Mon, Nov 15, 1999 at 07:01:44PM -0800, Tom Phoenix wrote:
That was my guess, too, but further tests don't seem to be consistent with #!perl -w $x = 'a'; print "1: $x\n"; { print "4: $x\n"; 1: a -- If $x were being localized at all, then 4 would be 'a', rather than 'b'. Ronald |
From [Unknown Contact. See original ticket]On Mon, Nov 15, 1999 at 07:01:44PM -0800, Tom Phoenix wrote:
That made so much sense when someone else pointed it out, I felt like an #!/usr/bin/perl -w { You will find that the input separator is "0". $/ is never localized. Andrew |
From [Unknown Contact. See original ticket]Tom Phoenix <rootbeer@redcat.com> writes:
That is exactly what it says ;-)
I think it is doing the right thing. -- |
From [Unknown Contact. See original ticket]From: Ronald J Kimball [mailto:rjk@linguist.dartmouth.edu]
Could it be that Perl is Ie, could it be an optimiser bug? Paul. |
From [Unknown Contact. See original ticket]"Moore, Paul" <Paul.Moore@uk.origin-it.com> wrote
It certainly would be a bug if the optimiser did that. But experiment % perl -w Mike Guy |
From [Unknown Contact. See original ticket]Nick Ing-Simmons <nik@tiuk.ti.com> wrote
It has been pointed out that the construct apparently isn't localising It can't be right for a local() not to localise anything *and* give And as another data point, I note that local (undef); is valid Perl. I suspect that '$/ = undef' is being evaluated as Mike Guy |
From [Unknown Contact. See original ticket]Watch this: Top x= 0 y=stone &x=080da578 &y=080da59c That's produced by the attached program. Notice that the --tom $x = '0'; sub show { show("Top"); { show("Inside Before"); { show("Way Outside"); |
From [Unknown Contact. See original ticket]This bug appears to still be active. There is some discussion as to A coworker accidentally did: { This did not localize $/ . I don't know what it did do. There was no -spp |
From [Unknown Contact. See original ticket]Another reminder that this bug is still active: Watch this: Top x= 0 y=stone &x=080da578 &y=080da59c That's produced by the attached program. Notice that the --tom $x = '0'; sub show { show("Top"); { show("Inside Before"); { show("Way Outside"); |
From @gbarrThis is still present in 5.8.0 |
From @iabyn(Just reviewing old Perl bug reports). In the latest development versions of Perl (which will eventually $ ./perl -we 'local($/ = undef)' This was added by patch #19588 Regards, Dave M. |
@iabyn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#1778 (status was 'resolved')
Searchable as RT1778$
The text was updated successfully, but these errors were encountered: