in reply to Re^2: Inlining a "lexically-scoped scalar which has no other references"
in thread Inlining a "lexically-scoped scalar which has no other references"
The oldest I have is 5.6.0, but it doesn't give a warning even when uncommenting the last line.
Changing no warnings; to use warnings; shows that the following creates a constant in 5.6.0 and 5.6.1, but not in 5.8.0:
sub with_proto () { my $lex }
>c:\progs\perl560\bin\perl test.pl Use of uninitialized value at test.pl line 12. Constant subroutine with_proto redefined at test.pl line 12. Subroutine with_proto redefined at test.pl line 16. Subroutine with_proto redefined at test.pl line 20. Subroutine with_proto redefined at test.pl line 25. Subroutine with_proto redefined at test.pl line 29. Subroutine with_proto redefined at test.pl line 36. Subroutine with_proto redefined at test.pl line 41. Subroutine with_proto redefined at test.pl line 45. Subroutine with_proto redefined at test.pl line 55. Constant subroutine with_proto redefined at test.pl line 58. >c:\progs\perl561\bin\perl test.pl Use of uninitialized value at test.pl line 12. Constant subroutine with_proto redefined at test.pl line 12. Subroutine with_proto redefined at test.pl line 16. Subroutine with_proto redefined at test.pl line 20. Subroutine with_proto redefined at test.pl line 25. Subroutine with_proto redefined at test.pl line 29. Subroutine with_proto redefined at test.pl line 36. Subroutine with_proto redefined at test.pl line 41. Subroutine with_proto redefined at test.pl line 45. Subroutine with_proto redefined at test.pl line 55. Constant subroutine with_proto redefined at test.pl line 58. >c:\progs\perl580\bin\perl test.pl Subroutine with_proto redefined at test.pl line 12. Subroutine with_proto redefined at test.pl line 16. Subroutine with_proto redefined at test.pl line 20. Subroutine with_proto redefined at test.pl line 25. Subroutine with_proto redefined at test.pl line 29. Subroutine with_proto redefined at test.pl line 36. Subroutine with_proto redefined at test.pl line 41. Subroutine with_proto redefined at test.pl line 45. Subroutine with_proto redefined at test.pl line 55. Constant subroutine with_proto redefined at test.pl line 58.
Update: I identified the wrong one. Fixed.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Inlining a "lexically-scoped scalar which has no other references"
by ikegami (Patriarch) on Sep 28, 2009 at 02:09 UTC | |
by LanX (Saint) on Sep 28, 2009 at 02:21 UTC | |
by ikegami (Patriarch) on Sep 28, 2009 at 02:56 UTC |