Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Perl-Critic CPAN distribution.

Report information
The Basics
Id: 18023
Status: resolved
Priority: 0/
Queue: Perl-Critic

People
Owner: thaljef [...] cpan.org
Requestors: polettix [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.14
Fixed in: 0.14_01



Subject: BEGIN and END blocks treated as subroutines
Hi, I noticed that BEGIN and END blocks are signalled as: Subroutine does not end with 'return' at line ... but they're not real subroutines. Compliments for the module(s), anyway! BR, Flavio.
This was fixed in version 0.14. Can you double check which version of Perl::Critic you have installed (e.g. `perlcritic -V`) and/or send me a copy of the file that caused the error (mailto:thaljef@cpan.org) ? Thanks. -Jeff
I installed Perl::Critic yesterday night to take a look. Anyway, here you go with a small example: poletti@PolettiX:~/sviluppo/perl$ cat pcritic.pl #!/usr/bin/perl use strict; use warnings; # $Revision$ $Source$ $Date$ our $VERSION = 1; BEGIN { print {*STDOUT} 'beginning...'; } END { print {*STDOUT} 'ending...'; } poletti@PolettiX:~/sviluppo/perl$ perlcritic -V 0.14 poletti@PolettiX:~/sviluppo/perl$ perlcritic pcritic.pl pcritic.pl source OK poletti@PolettiX:~/sviluppo/perl$ perlcritic -1 pcritic.pl Subroutine does not end with 'return' at line 8, column 1. See page 197 of PBP. (Severity: 4) Subroutine does not end with 'return' at line 12, column 1. See page 197 of PBP. (Severity: 4) poletti@PolettiX:~/sviluppo/perl$ BR, Flavio