Bug 24545: Cannot return outside of sub

We must die instead

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2020-03-09 15:59:41 +01:00 committed by Martin Renvoize
parent 83da3af9da
commit 61a2c4db6a
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ sub wanted {
find({ wanted => \&wanted, no_chdir => 1 }, File::Spec->curdir());
foreach my $name (@files) {
open( FILE, $name ) || return 0;
open( FILE, $name ) || die "cannot open file $name $!";
my ( $hascopyright, $hasgpl, $hasv3, $hasorlater, $haslinktolicense,
$hasfranklinst, $is_not_us ) = (0)x7;
while ( my $line = <FILE> ) {