Ed Avis

Results 24 issues of Ed Avis

In the big CSV file of all data at https://github.com/OxCGRT/covid-policy-tracker/raw/master/data/OxCGRT_latest.csv there are rows for 2021-04-19 and later dates, but these rows are blank in the latest rows. For example the...

A new policy could detect exact duplicate `use` statements in the same package. These two examples would give a message: ``` use Foo; use Bar; use Foo; ``` ``` use...

Suggested policy

Lots of Perl code looks like ``` if (/(some) (regexp) (with) (captures)/) { my @stuff = ($1, $2, $3, $4); ... } ``` This could nowadays be expressed better as...

Suggested policy

`Use of uninitialized value $word in pattern match (m//) at /usr/share/perl5/vendor_perl/PPI/Tokenizer.pm line 836.` This is from running perlcritic; if you're unable to reproduce this I can whittle it down to...

fixed

**Description** The `return` keyword cannot be used outside a subroutine. It will give an error at run time. But it should be straightforward to check at compile time too. That...

Feature Request

**Description** Although with `use strict` Perl will report the use of a variable that hasn't been declared, it doesn't catch mistakes in builtin variables that have a long name such...

Feature Request

Normally perlcritic will report if a file specified does not exist. ``` % perlcritic xxx No such file or directory: 'xxx' ``` But if the filename specified is 0 then...

Bug

This program does a regexp capture and does check it succeeded, dying if not: ``` $_ = ; if (not /(\w)/) { die; } print $1; ``` But perlcritic complains:...

Bug

``` % mkdir x % cd x % echo 'verbose = "%f:%l:%c:%m [%p] (%e)\n"' >.perlcriticrc % touch y % perlcritic --brutal y Operator or semicolon missing before %f at (eval...

Bug

Perlcritic fails to understand the control flow here: ``` sub foo { foreach (@_) { if (not /(\w)/) { next if /X/; die; } return $1; } } ``` If...