Two issues emerged from Jonas' Perl::Critic talk at yesterdays CPH.pm meeting.
Straying away from the topic, I learned that Perltidy won't accept Error.pm's try/catch/otherwise as a control structure and consequently doesn't format it the way I like. I like to cuddle my elses (yes, I'm that kind of guy) and would like this formatting for a try block
try {
do something
} catch
do something
} otherwise {
do something
};
but it seems that Perltidy can't do that. Can anyone confirm this?
The other issue is that Perl::Critic fails make test. I tried on a fairly OK Perl installation, and I see that this issue already has been reported:
t/20_policies.............................NOK 69/682
# Failed test 'BuiltinFunctions::RequireGlobFunction - line 19 - Multiple globs via '
# at t/20_policies.t line 95.
# got: '2'
# expected: '1'
# Violation found: Glob written as at line 2, column 11. See page 167 of PBP.
# Violation found: Glob written as at line 2, column 19. See page 167 of PBP.
I haven't used Error.pm (Score:1)
They named it "otherwise"? Really?
1.078 test fail (Score:1)
The next P::C will fix it, or you can downgrade PPI (I don't recommend that) or you can ignore the test failure.