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
my $v if (0); leaves $v around #8097
Comments
From brucer@gsg-lnx-bld1.cisco.comThis is a bug report for perl from brucer@gsg-lnx-bld1.cisco.com, The following program invokes beta once instead of twice. thanks, --cut-- sub beta ($) { sub alpha ($) { alpha( 'A'); sub beta ($) { sub alpha ($$) { alpha( 'A',0); Flags: Site configuration information for perl v5.8.6: Configured by brucer at Tue Jan 4 17:17:23 PST 2005. Summary of my perl5 (revision 5 version 8 subversion 6) configuration: Locally applied patches: @INC for perl v5.8.6: Environment for perl v5.8.6: |
From @iabynOn Wed, Sep 07, 2005 at 05:19:55PM -0700, brucer @ gsg-lnx-bld1. cisco. com wrote:
This is a well-known problem, which is difficult to fix without breaking The problem boils down to: If the 'my $x' is skipped at runtime, then at scope exit the variable isn't -- |
The RT System itself - Status changed from 'new' to 'open' |
From pfusik@op.pl
Really? It is effectively: $c = beta ($a) if ( ! defined $c ); # the "if" condition is true
Why not?
Yes, because it is not my-ed. |
@rgs - Status changed from 'open' to 'rejected' |
From @schwernOn Wed, Sep 07, 2005 at 05:19:55PM -0700, brucer @ gsg-lnx-bld1. cisco. com wrote:
The short answer is "don't do that". C<my $v if 0;> has already been deprecated in the development version of $ bleadperl -wle 'my $v if 0;' -- |
Migrated from rt.perl.org#37101 (status was 'rejected')
Searchable as RT37101$
The text was updated successfully, but these errors were encountered: