in reply to Re: A short whishlist of Perl5 improvements leaping to Perl7
in thread A short whishlist of Perl5 improvements leaping to Perl7
should be mentioned that Perl has an "used only once" warning, I'm surprised that python doesn't.
> Also having automine would mean that using perl 5 code that wasn't written with strict would compile, but turn package variable into lexicals.
automine or whatever we'd call it must obviously be a pragma extending strict, not a default feature. New pragmas breaking old code is no surprise.
looks like used-only-once gets deactivated with explicit declaration
#use strict; use warnings; my $the_variable_I_want_to_check = 0; # somewhere in your code and then $the_varaible_I_want_to_check = 1;
C:/Perl_524/bin\perl.exe -w d:/tmp/pm/t_typo.pl Name "main::the_varaible_I_want_to_check" used only once: possible typ +o at d:/tmp/pm/t_typo.pl line 8.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: A short whishlist of Perl5 improvements leaping to Perl7 (used only once)
by tobyink (Canon) on Nov 27, 2020 at 22:41 UTC | |
by LanX (Saint) on Nov 27, 2020 at 23:32 UTC | |
Re^3: A short whishlist of Perl5 improvements leaping to Perl7 (used only once)
by dsheroh (Monsignor) on Nov 28, 2020 at 12:50 UTC | |
by LanX (Saint) on Nov 28, 2020 at 12:57 UTC |