Warning fix to change #3922.
Paul Marquess [Thu, 5 Aug 1999 09:01:15 +0000 (10:01 +0100)]
To: ilya@math.ohio-state.edu, gsar@activestate.com
Cc: tchrist@jhereg.perl.com, chaimf@pobox.com, ed@chronos.net,
        perl5-porters@perl.org
Subject: RE: [PATCH 5.00557] split /^/
Message-ID: <5104D4DBC598D211B5FE0000F8FE7EB202D49B23@mbtlipnt02.btlabs.bt.co.uk>

p4raw-link: @3922 on //depot/cfgperl: 2cdd06f700e22243a0f92357f562eb4b13b7197a

p4raw-id: //depot/cfgperl@3924

pp.c

diff --git a/pp.c b/pp.c
index e3969be..b7e94f5 100644 (file)
--- a/pp.c
+++ b/pp.c
@@ -5010,8 +5010,9 @@ PP(pp_split)
     else if (rx->prelen == 1 && *rx->precomp == '^') {
        if (!(pm->op_pmflags & PMf_MULTILINE)
            && !(pm->op_pmregexp->reganch & ROPT_WARNED)) {
-           if (ckWARN(WARN_DEPRECATED))
-               warn("split /^/ better written as split /^/m");
+           if (ckWARN_d(WARN_DEPRECATED))
+               Perl_warner(aTHX_ WARN_DEPRECATED,
+                           "split /^/ better written as split /^/m");
            pm->op_pmregexp->reganch |= ROPT_WARNED;
        }       
        while (--limit) {