summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2017-02-13 13:18:38 -0700
committerKarl Williamson <khw@cpan.org>2017-02-13 21:24:09 -0700
commitc77da5ff879f4bc56ececd521148ca08ab8ce837 (patch)
treef0295147fc884caeb60511da6c47c190827104b5 /perl.c
parentf88c646639aaa9f3f90a801fa3aa5d1ce27fd3c0 (diff)
downloadperl-c77da5ff879f4bc56ececd521148ca08ab8ce837.tar.gz
Extract code into a function
This creates a function in toke.c to output the compilation aborted message, changing perl.c to call that function. This is in preparation for this to be called from a 2nd place
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/perl.c b/perl.c
index 09eb2f4f62..98bf356652 100644
--- a/perl.c
+++ b/perl.c
@@ -2374,12 +2374,7 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit)
SETERRNO(0,SS_NORMAL);
if (yyparse(GRAMPROG) || PL_parser->error_count) {
- if (PL_minus_c)
- Perl_croak(aTHX_ "%s had compilation errors.\n", PL_origfilename);
- else {
- Perl_croak(aTHX_ "Execution of %s aborted due to compilation errors.\n",
- PL_origfilename);
- }
+ abort_execution("", PL_origfilename);
}
CopLINE_set(PL_curcop, 0);
SET_CURSTASH(PL_defstash);