Ed Avis

Results 29 issues of Ed Avis

With recent changes to the handling of $@ in the perl core, is the policy RequireCheckingReturnValueOfEval still needed? It accounts for a disproportionate share of bug reports against Perl::Critic so...

Enhancement

The empty regexp reuses the last successful match. This is useful in cases where you want to check for a match and then substitute. A trivial example: ``` if (/oo/)...

Suggested policy

I see beginners writing code like `%a = (%a, x => 5);` This is normally equivalent to `$a{x} = 5;` and perlcritic could suggest that.

Suggested policy

Suppose your `.perlcriticrc` contains ``` [Variables::ProhibitReusedNames] allow = $foo $bar [-Variables::ProhibitReusedNames] ``` and a source file `t` contains ``` my ($x, $y); my ($x, $y); ``` Then running perlcritic reports...

Enhancement

Beginners may write code like ``` if (defined $something->{or_other}) { $v = $something->{or_other}; } else { $v = $default; } ``` This can be transformed into a single assignment ```...

Suggested policy

Sometimes recode dies with 'Invalid input'. An --ignore-invalid flag would do whatever needed to skip over junk bytes in the input, recovering whatever valid text can be found. Of course,...

Currently you run `loc`, it prints its result and exits. You could add a kind of interactive mode: ``` % loc -i >loc [prints a count of lines in the...

**Where** perlref section Postfix Dereference Syntax **Description** The documentation is accurate to say that postfix deref works in all cases where block deref does. But it doesn't specially mention that...

documentation

Hi, I am trying out shx (cloned from gitlab today) with emacs 28.2. If I move point to an earlier command and press `C-RET`, I expected the text of that...

I want to search for the literal string `+1` but the obvious command line does something strange: ``` % ack -Q '+1' ack: No regular expression found. ``` I can...