Andy Lester

Results 231 issues of Andy Lester

Instead of trying to cram the SQL injection discussion on the front page, move it to its own page.

From Steve Davis [email protected] Hey Andy, Thanks for your bobby-tables page and language examples. I see your todo list includes “explain why creating code from outside data is bad” and...

"use base" is ancient. parent is preferred now.

Enhancement

There are 186 tickets in [the RT queue](https://rt.cpan.org/Dist/Display.html?Queue=Perl-Critic), each from 7 to 15 years old. We need to go through each of these and either bring it over to the...

Dev internals

``` $ cat -n foo.pl 1 #!/usr/bin/perl 2 3 use warnings; 4 use strict; 5 use 5.010; 6 7 my $x = 'outer x'; 8 my $y = 'outer y';...

Bug

It recognizes `foo($$)` as a prototype but not `bar :prototype($$)`. ``` $ cat foo.pl #!/usr/bin/perl use warnings; use strict; use 5.010; sub foo($$) {} sub bar :prototype($$) {} ``` ```...

Bug

Given this program: ``` #!/var/perl/bin/perl use strict; use warnings; my $x = 1; my $y = 4; sub foo {1} $x + $y; 3+4; $x + foo(); $y; ``` Running...

Enhancement

You should always check the return value of `m//`, just like not checking return value of `open` is always bad. ``` $x =~ /foo/; # This does nothing. $x =~...

Enhancement

This is almost certainly incorrect. my ($k,$v) = each %h; For that matter, so is this: for my $i ( each %h ) ... # basically the same as keys...

Suggested policy

Prompted by https://www.reddit.com/r/perl/comments/c4lhaq/and_most_damning_of_all_the_resulting_code_was/erx5hno/ > The punchline is, of course, the 100 kB file keeper in http://www.ibiblio.org/pub/Linux/search/keeper-1.54.tar.gz. The code is so eyewateringly bad, it crashes Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles. esr made a career out...