From 5b5e9b121ca43f2b270779b4297b7fb6c8324818 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 9 Mar 2020 15:59:41 +0100 Subject: [PATCH] Bug 24545: Cannot return outside of sub We must die instead --- xt/find-license-problems.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xt/find-license-problems.t b/xt/find-license-problems.t index 0df167d6b3..de89e931ca 100755 --- a/xt/find-license-problems.t +++ b/xt/find-license-problems.t @@ -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 = ) { -- 2.20.1