diff options
author | Karl Williamson <khw@cpan.org> | 2017-02-13 13:18:38 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2017-02-13 21:24:09 -0700 |
commit | c77da5ff879f4bc56ececd521148ca08ab8ce837 (patch) | |
tree | f0295147fc884caeb60511da6c47c190827104b5 /perl.c | |
parent | f88c646639aaa9f3f90a801fa3aa5d1ce27fd3c0 (diff) | |
download | perl-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.c | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -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); |