diff options
author | Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> | 2014-01-02 14:06:51 +0100 |
---|---|---|
committer | Matthew Horsfall (alh) <wolfsage@gmail.com> | 2014-06-17 08:07:22 -0400 |
commit | 4963771dd10435273997ef50267b3ebd07dfb80b (patch) | |
tree | 711a973e2cdec3435a7a908f3149ffa9012b6395 /toke.c | |
parent | c338375688229712edcde6a1ad31fcc586f10e91 (diff) | |
download | perl-4963771dd10435273997ef50267b3ebd07dfb80b.tar.gz |
Remove "ternary operator parsed as search pattern" warning
Since ?PATTERN? without 'm' is no longer supported, there is no
ambiguity any more.
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -8794,14 +8794,8 @@ S_scan_pat(pTHX_ char *start, I32 type) PERL_ARGS_ASSERT_SCAN_PAT; s = scan_str(start,TRUE,FALSE, (PL_in_eval & EVAL_RE_REPARSING), NULL); - if (!s) { - const char * const delimiter = skipspace(start); - Perl_croak(aTHX_ - (const char *) - (*delimiter == '?' - ? "Search pattern not terminated or ternary operator parsed as search pattern" - : "Search pattern not terminated" )); - } + if (!s) + Perl_croak(aTHX_ "Search pattern not terminated"); pm = (PMOP*)newPMOP(type, 0); if (PL_multi_open == '?') { |