-
Notifications
You must be signed in to change notification settings - Fork 561
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
Recursive lexically-scoped subroutines #199
Comments
From garethr@cre.canon.co.ukIf I run the program use strict; I get the error Global symbol "$fact" requires explicit package name at fact.pl line 9. The `perlsub' manpage states that A "my" declares the listed variables to be confined so I think that either Perl's behavour should be changed to match the (I know that I can rewrite `factorial' as sub factorial { in order to get it to work as intended. That's not what this report is Perl Info
|
@iabyn - Status changed from 'open' to 'resolved' |
From @iabyn
line 9.
What you are seeing here is a more glorified version of my $x = $x; From perlsub.pod: The declared variable is not introduced (is not visible) until after my $x = $x; can be used to initialize a new $x with the value of the old $x, and my $x = 123 and $x == 123 is false unless the old $x happened to have the value C<123>. So the lexical $fact doesnt come into scope until the end of the Dave M. |
From @iabynnotabug. |
@iabyn - Status changed from 'open' to 'resolved' |
warn and test against this published metasploit attack vector. See GH #199
Migrated from rt.perl.org#1005 (status was 'resolved')
Searchable as RT1005$
The text was updated successfully, but these errors were encountered: