Skip to content

Commit

Permalink
perlcc: exit on missing compile-time module #445
Browse files Browse the repository at this point in the history
  • Loading branch information
agentzh authored and Reinhard Urban committed Nov 1, 2022
1 parent 9e1173c commit 13a26fc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions script/perlcc.PL
Expand Up @@ -465,6 +465,9 @@ sub compile_byte {
} else {
my @error = grep { !/^$Input syntax OK$/o } @$error_r;
@error = grep { !/^No package specified for compilation, assuming main::$/o } @error;
if (grep { /Can't locate \S+ in \@INC \(/ } @error) {
die "$0: Missing Perl modules\n@error";
}
warn "$0: Unexpected compiler output\n@error" if @error and opt('v')<5;
warn "@error" if @error and opt('v')>4;
}
Expand Down Expand Up @@ -590,6 +593,9 @@ sub compile_cstyle {
if (opt('check')) {
print "@error" if @error;
} else {
if (grep { /Can't locate \S+ in \@INC \(/ } @error) {
die "$0: Missing Perl modules\n@error";
}
warn "$0: Unexpected compiler output\n@error" if @error and opt('v')<5;
warn "@error" if @error and opt('v')>4;
}
Expand Down

0 comments on commit 13a26fc

Please sign in to comment.