It would be nice to append to the end of the perlcriticrc file for the koha qa test tools: [InputOutput::RequireCheckedSyscalls] functions = :builtins exclude_functions = print
Created attachment 47222 [details] [review] Allow print function return value to be ignored. TEST PLAN --------- 1) link ~/.perlcriticrc to ~/qa-test-tools/perlcriticrc 2) save simple script --- BEGIN example.pl --- #!/usr/bin/perl use Modern::Perl; our $VERSION = q{1.0}; print "Hello World!\n"; --- END example.pl --- 3) perlcritic -1 example.pl Return value of flagged function ignored - print at line 5, column 1. See pages 208,278 of PBP. (Severity: 1) 4) Apply this patch to the qa test tools 5) redo step 3 example.pl source OK
% perlcritic -1 C4/Auth.pm | wc -l 531 Well, it seems that we are not ready at all for level 1...
(In reply to Jonathan Druart from comment #2) > Well, it seems that we are not ready at all for level 1... No, but checking the return value for the print function is something I added, because my perlcritic rc file is softlinked to this one, and I sometimes aim to write my code for level 1. :)
Could you convince me why we would need this patch? We do not have any occurrences of my $foo = print('bar') in the code.