-
Notifications
You must be signed in to change notification settings - Fork 560
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
attributes turn "state" into "my" #9839
Comments
From zefram@fysh.orgCreated by zefram@fysh.org$ perl -lwE 'sub MODIFY_SCALAR_ATTRIBUTES { () } my $i = 0; sub foo { state $x :A0 = $i++; print \$x, " ", $x } foo(); foo()' The initialiser gets run twice, and indeed we get two distinct variables. $ perl -lwE 'sub MODIFY_SCALAR_ATTRIBUTES { () } my $i = 0; sub foo { state $x = $i++; print \$x, " ", $x } foo(); foo()' Perl Info
|
@TJC - Status changed from 'new' to 'open' |
From @cpansproutFixed by a1fba7e. |
@cpansprout - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#68658 (status was 'resolved')
Searchable as RT68658$
The text was updated successfully, but these errors were encountered: