To: Gurusamy Sarathy <gsar@activestate.com>
Cc: Tom Christiansen <tchrist@jhereg.perl.com>, chaimf@pobox.com,
ed@chronos.net, perl5-porters@perl.org
Subject: [PATCH 5.00557] split /^/
Message-ID: <
19990804164657.A3776@monk.mps.ohio-state.edu>
p4raw-id: //depot/cfgperl@3922
(F) A sort comparison subroutine may not return a list value with more
or less than one element. See L<perlfunc/sort>.
+=item split /^/ better written as split /^/m
+
+(W) Implicit translation of /^/ to mean /^/m in split is deprecated.
+
=item Split loop
(P) The split was looping infinitely. (Obviously, a split shouldn't iterate
++s;
}
}
- else if (strEQ("^", rx->precomp)) {
+ 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");
+ pm->op_pmregexp->reganch |= ROPT_WARNED;
+ }
while (--limit) {
/*SUPPRESS 530*/
for (m = s; m < strend && *m != '\n'; m++) ;
#define RE_INTUIT_ONECHAR 0x4000000
#define RE_INTUIT_TAIL 0x8000000
+#define ROPT_WARNED 0x10000000
+
#define RE_USE_INTUIT (RE_USE_INTUIT_NOML|RE_USE_INTUIT_ML)
#define REINT_AUTORITATIVE (REINT_AUTORITATIVE_NOML|REINT_AUTORITATIVE_ML)
#define REINT_ONCE (REINT_ONCE_NOML|REINT_ONCE_ML)