[Midnightbsd-cvs] src [6444] U trunk/contrib/perl: perl 5.18.1 merge
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Mon Dec 2 16:30:11 EST 2013
Revision: 6444
http://svnweb.midnightbsd.org/src/?rev=6444
Author: laffer1
Date: 2013-12-02 16:30:11 -0500 (Mon, 02 Dec 2013)
Log Message:
-----------
perl 5.18.1 merge
Modified Paths:
--------------
trunk/contrib/perl/ext/attributes/attributes.pm
trunk/contrib/perl/ext/attributes/attributes.xs
trunk/contrib/perl/ext/mro/Changes
trunk/contrib/perl/ext/mro/mro.pm
trunk/contrib/perl/ext/mro/mro.xs
trunk/contrib/perl/ext/re/Makefile.PL
trunk/contrib/perl/ext/re/re.pm
trunk/contrib/perl/ext/re/re.xs
trunk/contrib/perl/ext/re/re_top.h
trunk/contrib/perl/ext/re/t/re.t
trunk/contrib/perl/ext/re/t/re_funcs_u.t
trunk/contrib/perl/ext/re/t/reflags.t
trunk/contrib/perl/ext/re/t/regop.t
trunk/contrib/perl/mkppport.lst
Added Paths:
-----------
trunk/contrib/perl/ext/attrs/
trunk/contrib/perl/ext/mro/t/
trunk/contrib/perl/ext/threads/
Property Changed:
----------------
trunk/contrib/perl/ext/attributes/attributes.pm
trunk/contrib/perl/ext/attributes/attributes.xs
trunk/contrib/perl/ext/mro/Changes
trunk/contrib/perl/ext/mro/mro.pm
trunk/contrib/perl/ext/mro/mro.xs
trunk/contrib/perl/ext/re/Makefile.PL
trunk/contrib/perl/ext/re/hints/mpeix.pl
trunk/contrib/perl/ext/re/re.pm
trunk/contrib/perl/ext/re/re.xs
trunk/contrib/perl/ext/re/re_comp.h
trunk/contrib/perl/ext/re/re_top.h
trunk/contrib/perl/ext/re/t/lexical_debug.pl
trunk/contrib/perl/ext/re/t/lexical_debug.t
trunk/contrib/perl/ext/re/t/qr.t
trunk/contrib/perl/ext/re/t/re.t
trunk/contrib/perl/ext/re/t/re_funcs.t
trunk/contrib/perl/ext/re/t/re_funcs_u.t
trunk/contrib/perl/ext/re/t/reflags.t
trunk/contrib/perl/ext/re/t/regop.pl
trunk/contrib/perl/ext/re/t/regop.t
trunk/contrib/perl/mkppport
trunk/contrib/perl/mkppport.lst
Modified: trunk/contrib/perl/ext/attributes/attributes.pm
===================================================================
--- trunk/contrib/perl/ext/attributes/attributes.pm 2013-12-02 21:28:58 UTC (rev 6443)
+++ trunk/contrib/perl/ext/attributes/attributes.pm 2013-12-02 21:30:11 UTC (rev 6444)
@@ -1,6 +1,6 @@
package attributes;
-our $VERSION = 0.14;
+our $VERSION = 0.21;
@EXPORT_OK = qw(get reftype);
@EXPORT = ();
@@ -34,6 +34,15 @@
require warnings;
warnings::warnif('deprecated', "Attribute \"$1\" is deprecated");
0;
+ } : $svtype eq 'CODE' && /^-?lvalue\z/ ? do {
+ require warnings;
+ warnings::warnif(
+ 'misc',
+ "lvalue attribute "
+ . (/^-/ ? "removed from" : "applied to")
+ . " already-defined subroutine"
+ );
+ 0;
} : 1
} _modify_attrs(@_);
}
@@ -190,8 +199,9 @@
First of all C<import> gets the type of the third parameter ('CODE' in this case).
C<attributes.pm> checks if there is a subroutine called C<< MODIFY_<reftype>_ATTRIBUTES >>
-in the caller's namespace (here: 'main'). In this case a subroutine C<MODIFY_CODE_ATTRIBUTES> is
-required. Then this method is called to check if you have used a "bad attribute".
+in the caller's namespace (here: 'main'). In this case a
+subroutine C<MODIFY_CODE_ATTRIBUTES> is required. Then this
+method is called to check if you have used a "bad attribute".
The subroutine call in this example would look like
MODIFY_CODE_ATTRIBUTES( 'main', \&foo, 'method' );
@@ -210,21 +220,49 @@
=item lvalue
Indicates that the referenced subroutine is a valid lvalue and can
-be assigned to. The subroutine must return a modifiable value such
+be assigned to. The subroutine must return a modifiable value such
as a scalar variable, as described in L<perlsub>.
+This module allows one to set this attribute on a subroutine that is
+already defined. For Perl subroutines (XSUBs are fine), it may or may not
+do what you want, depending on the code inside the subroutine, with details
+subject to change in future Perl versions. You may run into problems with
+lvalue context not being propagated properly into the subroutine, or maybe
+even assertion failures. For this reason, a warning is emitted if warnings
+are enabled. In other words, you should only do this if you really know
+what you are doing. You have been warned.
+
=item method
-Indicates that the referenced subroutine is a method. A subroutine so marked
+Indicates that the referenced subroutine
+is a method. A subroutine so marked
will not trigger the "Ambiguous call resolved as CORE::%s" warning.
=item locked
-The "locked" attribute has no effect in 5.10.0 and later. It was used as part
-of the now-removed "Perl 5.005 threads".
+The "locked" attribute is deprecated, and has no effect in 5.10.0 and later.
+It was used as part of the now-removed "Perl 5.005 threads".
=back
+The following are the built-in attributes for variables:
+
+=over 4
+
+=item shared
+
+Indicates that the referenced variable can be shared across different threads
+when used in conjunction with the L<threads> and L<threads::shared> modules.
+
+=item unique
+
+The "unique" attribute is deprecated, and has no effect in 5.10.0 and later.
+It used to indicate that a single copy of an C<our> variable was to be used by
+all interpreters should the program happen to be running in a
+multi-interpreter environment.
+
+=back
+
=head2 Available Subroutines
The following subroutines are available for general use once this module
@@ -454,7 +492,8 @@
print "foo\n";
}
-This example runs. At compile time C<MODIFY_CODE_ATTRIBUTES> is called. In that
+This example runs. At compile time
+C<MODIFY_CODE_ATTRIBUTES> is called. In that
subroutine, we check if any attribute is disallowed and we return a list of
these "bad attributes".
@@ -476,7 +515,8 @@
}
This example is aborted at compile time as we use the attribute "Test" which
-isn't allowed. C<MODIFY_CODE_ATTRIBUTES> returns a list that contains a single
+isn't allowed. C<MODIFY_CODE_ATTRIBUTES>
+returns a list that contains a single
element ('Test').
=back
Property changes on: trunk/contrib/perl/ext/attributes/attributes.pm
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1.1.1
\ No newline at end of property
Modified: trunk/contrib/perl/ext/attributes/attributes.xs
===================================================================
--- trunk/contrib/perl/ext/attributes/attributes.xs 2013-12-02 21:28:58 UTC (rev 6443)
+++ trunk/contrib/perl/ext/attributes/attributes.xs 2013-12-02 21:30:11 UTC (rev 6444)
@@ -12,7 +12,7 @@
* 'Perilous to us all are the devices of an art deeper than we possess
* ourselves.' --Gandalf
*
- * [p.597 of _The Lord of the Rings_, III/xi: "The Palant\xEDr"]
+ * [p.597 of _The Lord of the Rings_, III/xi: "The Palantír"]
*/
#define PERL_NO_GET_CONTEXT
@@ -48,10 +48,15 @@
switch (name[3]) {
case 'l':
if (memEQ(name, "lvalue", 6)) {
+ bool warn =
+ !CvISXSUB(MUTABLE_CV(sv))
+ && CvROOT(MUTABLE_CV(sv))
+ && !CvLVALUE(MUTABLE_CV(sv)) != negated;
if (negated)
CvFLAGS(MUTABLE_CV(sv)) &= ~CVf_LVALUE;
else
CvFLAGS(MUTABLE_CV(sv)) |= CVf_LVALUE;
+ if (warn) break;
continue;
}
break;
@@ -157,7 +162,7 @@
sv = SvRV(rv);
if (SvOBJECT(sv))
- sv_setpvn(TARG, HvNAME_get(SvSTASH(sv)), HvNAMELEN_get(SvSTASH(sv)));
+ Perl_sv_sethek(aTHX_ TARG, HvNAME_HEK(SvSTASH(sv)));
#if 0 /* this was probably a bad idea */
else if (SvPADMY(sv))
sv_setsv(TARG, &PL_sv_no); /* unblessed lexical */
@@ -179,7 +184,7 @@
break;
}
if (stash)
- sv_setpvn(TARG, HvNAME_get(stash), HvNAMELEN_get(stash));
+ Perl_sv_sethek(aTHX_ TARG, HvNAME_HEK(stash));
}
SvSETMAGIC(TARG);
@@ -211,8 +216,8 @@
* Local variables:
* c-indentation-style: bsd
* c-basic-offset: 4
- * indent-tabs-mode: t
+ * indent-tabs-mode: nil
* End:
*
- * ex: set ts=8 sts=4 sw=4 noet:
+ * ex: set ts=8 sts=4 sw=4 et:
*/
Property changes on: trunk/contrib/perl/ext/attributes/attributes.xs
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1.1.1
\ No newline at end of property
Modified: trunk/contrib/perl/ext/mro/Changes
===================================================================
--- trunk/contrib/perl/ext/mro/Changes 2013-12-02 21:28:58 UTC (rev 6443)
+++ trunk/contrib/perl/ext/mro/Changes 2013-12-02 21:30:11 UTC (rev 6444)
@@ -1,5 +1,8 @@
Revision history for Perl extension mro.
+1.08 Sun Jun 12 14:09:03 BST 2011
+ - remove two broken URLs from the documentation
+
1.01 Fri Dec 26 19:23:01 2008
- original version; created by h2xs 1.23 with options
-b 5.10.0 -c -A -n mro --skip-ppport
Property changes on: trunk/contrib/perl/ext/mro/Changes
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1.1.1
\ No newline at end of property
Modified: trunk/contrib/perl/ext/mro/mro.pm
===================================================================
--- trunk/contrib/perl/ext/mro/mro.pm 2013-12-02 21:28:58 UTC (rev 6443)
+++ trunk/contrib/perl/ext/mro/mro.pm 2013-12-02 21:30:11 UTC (rev 6444)
@@ -12,7 +12,7 @@
# mro.pm versions < 1.00 reserved for MRO::Compat
# for partial back-compat to 5.[68].x
-our $VERSION = '1.07';
+our $VERSION = '1.11';
sub import {
mro::set_mro(scalar(caller), $_[1]) if $_[1];
@@ -308,7 +308,7 @@
=over 4
-=item L<http://www.webcom.com/haahr/dylan/linearization-oopsla96.html>
+=item L<http://haahr.tempdomainname.com/dylan/linearization-oopsla96.html>
=back
@@ -322,8 +322,6 @@
=over 4
-=item L<http://aspn.activestate.com/ASPN/Mail/Message/perl6-internals/2746631>
-
=item L<http://use.perl.org/~autrijus/journal/25768>
=back
@@ -338,14 +336,6 @@
=back
-=head2 C3 for TinyCLOS
-
-=over 4
-
-=item L<http://www.call-with-current-continuation.org/eggs/c3.html>
-
-=back
-
=head2 Class::C3
=over 4
Property changes on: trunk/contrib/perl/ext/mro/mro.pm
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1.1.2
\ No newline at end of property
Modified: trunk/contrib/perl/ext/mro/mro.xs
===================================================================
--- trunk/contrib/perl/ext/mro/mro.xs 2013-12-02 21:28:58 UTC (rev 6443)
+++ trunk/contrib/perl/ext/mro/mro.xs 2013-12-02 21:30:11 UTC (rev 6444)
@@ -45,8 +45,8 @@
Perl_croak(aTHX_ "Can't linearize anonymous symbol table");
if (level > 100)
- Perl_croak(aTHX_ "Recursive inheritance detected in package '%s'",
- HEK_KEY(stashhek));
+ Perl_croak(aTHX_ "Recursive inheritance detected in package '%"SVf"'",
+ SVfARG(sv_2mortal(newSVhek(stashhek))));
meta = HvMROMETA(stash);
@@ -253,8 +253,10 @@
SV *errmsg;
I32 i;
- errmsg = newSVpvf("Inconsistent hierarchy during C3 merge of class '%s':\n\t"
- "current merge results [\n", HEK_KEY(stashhek));
+ errmsg = newSVpvf(
+ "Inconsistent hierarchy during C3 merge of class '%"SVf"':\n\t"
+ "current merge results [\n",
+ SVfARG(sv_2mortal(newSVhek(stashhek))));
for (i = 0; i <= av_len(retval); i++) {
SV **elem = av_fetch(retval, i, 0);
sv_catpvf(errmsg, "\t\t%"SVf",\n", SVfARG(*elem));
@@ -468,13 +470,14 @@
PREINIT:
SV* self = ST(0);
const I32 throw_nomethod = SvIVX(ST(1));
- register I32 cxix = cxstack_ix;
- register const PERL_CONTEXT *ccstack = cxstack;
+ I32 cxix = cxstack_ix;
+ const PERL_CONTEXT *ccstack = cxstack;
const PERL_SI *top_si = PL_curstackinfo;
HV* selfstash;
SV *stashname;
const char *fq_subname;
const char *subname;
+ bool subname_utf8 = 0;
STRLEN stashname_len;
STRLEN subname_len;
SV* sv;
@@ -550,6 +553,7 @@
fq_subname = SvPVX(sv);
fq_subname_len = SvCUR(sv);
+ subname_utf8 = SvUTF8(sv) ? 1 : 0;
subname = strrchr(fq_subname, ':');
} else {
subname = NULL;
@@ -583,7 +587,10 @@
SV* const val = HeVAL(cache_entry);
if(val == &PL_sv_undef) {
if(throw_nomethod)
- Perl_croak(aTHX_ "No next::method '%s' found for %s", subname, hvname);
+ Perl_croak(aTHX_ "No next::method '%"SVf"' found for %"SVf,
+ SVfARG(newSVpvn_flags(subname, subname_len,
+ SVs_TEMP | ( subname_utf8 ? SVf_UTF8 : 0 ) )),
+ SVfARG(sv_2mortal(newSVhek( HvNAME_HEK(selfstash) ))));
XSRETURN_EMPTY;
}
mXPUSHs(newRV_inc(val));
@@ -594,7 +601,8 @@
/* beyond here is just for cache misses, so perf isn't as critical */
stashname_len = subname - fq_subname - 2;
- stashname = newSVpvn_flags(fq_subname, stashname_len, SVs_TEMP);
+ stashname = newSVpvn_flags(fq_subname, stashname_len,
+ SVs_TEMP | (subname_utf8 ? SVf_UTF8 : 0));
/* has ourselves at the top of the list */
linear_av = S_mro_get_linear_isa_c3(aTHX_ selfstash, 0);
@@ -626,14 +634,16 @@
if (!curstash) {
if (ckWARN(WARN_SYNTAX))
- Perl_warner(aTHX_ packWARN(WARN_SYNTAX), "Can't locate package %"SVf" for @%s::ISA",
- (void*)linear_sv, hvname);
+ Perl_warner(aTHX_ packWARN(WARN_SYNTAX), "Can't locate package %"SVf" for @%"SVf"::ISA",
+ (void*)linear_sv,
+ SVfARG(sv_2mortal(newSVhek( HvNAME_HEK(selfstash) ))));
continue;
}
assert(curstash);
- gvp = (GV**)hv_fetch(curstash, subname, subname_len, 0);
+ gvp = (GV**)hv_fetch(curstash, subname,
+ subname_utf8 ? -(I32)subname_len : (I32)subname_len, 0);
if (!gvp) continue;
candidate = *gvp;
@@ -640,7 +650,8 @@
assert(candidate);
if (SvTYPE(candidate) != SVt_PVGV)
- gv_init(candidate, curstash, subname, subname_len, TRUE);
+ gv_init_pvn(candidate, curstash, subname, subname_len,
+ GV_ADDMULTI|(subname_utf8 ? SVf_UTF8 : 0));
/* Notably, we only look for real entries, not method cache
entries, because in C3 the method cache of a parent is not
@@ -656,7 +667,10 @@
(void)hv_store_ent(nmcache, sv, &PL_sv_undef, 0);
if(throw_nomethod)
- Perl_croak(aTHX_ "No next::method '%s' found for %s", subname, hvname);
+ Perl_croak(aTHX_ "No next::method '%"SVf"' found for %"SVf,
+ SVfARG(newSVpvn_flags(subname, subname_len,
+ SVs_TEMP | ( subname_utf8 ? SVf_UTF8 : 0 ) )),
+ SVfARG(sv_2mortal(newSVhek( HvNAME_HEK(selfstash) ))));
XSRETURN_EMPTY;
BOOT:
Property changes on: trunk/contrib/perl/ext/mro/mro.xs
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1.1.2
\ No newline at end of property
Modified: trunk/contrib/perl/ext/re/Makefile.PL
===================================================================
--- trunk/contrib/perl/ext/re/Makefile.PL 2013-12-02 21:28:58 UTC (rev 6443)
+++ trunk/contrib/perl/ext/re/Makefile.PL 2013-12-02 21:30:11 UTC (rev 6444)
@@ -25,6 +25,7 @@
my $regcomp_c = upupfile('regcomp.c');
my $regexec_c = upupfile('regexec.c');
my $dquote_static_c = upupfile('dquote_static.c');
+ my $inline_invlist_c = upupfile('inline_invlist.c');
<<EOF;
re_comp.c : $regcomp_c
@@ -31,18 +32,22 @@
- \$(RM_F) re_comp.c
\$(CP) $regcomp_c re_comp.c
-re_comp\$(OBJ_EXT) : re_comp.c dquote_static.c
+re_comp\$(OBJ_EXT) : re_comp.c dquote_static.c inline_invlist.c
re_exec.c : $regexec_c
- \$(RM_F) re_exec.c
\$(CP) $regexec_c re_exec.c
-re_exec\$(OBJ_EXT) : re_exec.c
+re_exec\$(OBJ_EXT) : re_exec.c inline_invlist.c
dquote_static.c : $dquote_static_c
- \$(RM_F) dquote_static.c
\$(CP) $dquote_static_c dquote_static.c
+inline_invlist.c : $inline_invlist_c
+ - \$(RM_F) inline_invlist.c
+ \$(CP) $inline_invlist_c inline_invlist.c
+
EOF
}
Property changes on: trunk/contrib/perl/ext/re/Makefile.PL
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1.1.3
\ No newline at end of property
Index: trunk/contrib/perl/ext/re/hints/mpeix.pl
===================================================================
--- trunk/contrib/perl/ext/re/hints/mpeix.pl 2013-12-02 21:28:58 UTC (rev 6443)
+++ trunk/contrib/perl/ext/re/hints/mpeix.pl 2013-12-02 21:30:11 UTC (rev 6444)
Property changes on: trunk/contrib/perl/ext/re/hints/mpeix.pl
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1.1.1
\ No newline at end of property
Modified: trunk/contrib/perl/ext/re/re.pm
===================================================================
--- trunk/contrib/perl/ext/re/re.pm 2013-12-02 21:28:58 UTC (rev 6443)
+++ trunk/contrib/perl/ext/re/re.pm 2013-12-02 21:30:11 UTC (rev 6444)
@@ -4,7 +4,7 @@
use strict;
use warnings;
-our $VERSION = "0.18";
+our $VERSION = "0.23";
our @ISA = qw(Exporter);
our @EXPORT_OK = ('regmust',
qw(is_regexp regexp_pattern
@@ -108,10 +108,6 @@
sub bits {
my $on = shift;
my $bits = 0;
- unless (@_) {
- require Carp;
- Carp::carp("Useless use of \"re\" pragma");
- }
ARG:
foreach my $idx (0..$#_){
my $s=$_[$idx];
@@ -146,7 +142,7 @@
my $reflags = $^H{reflags} || 0;
my $seen_charset;
while ($s =~ m/( . )/gx) {
- $_ = $1;
+ local $_ = $1;
if (/[adul]/) {
# The 'a' may be repeated; hide this from the rest of the
# code by counting and getting rid of all of them, then
@@ -239,7 +235,8 @@
$pat = '(?{ $foo = 1 })';
use re 'eval';
- /foo${pat}bar/; # won't fail (when not under -T switch)
+ /foo${pat}bar/; # won't fail (when not under -T
+ # switch)
{
no re 'taint'; # the default
@@ -246,7 +243,8 @@
($x) = ($^X =~ /^(.*)$/s); # $x is not tainted here
no re 'eval'; # the default
- /foo${pat}bar/; # disallowed (with or without -T switch)
+ /foo${pat}bar/; # disallowed (with or without -T
+ # switch)
}
use re '/ix';
@@ -255,22 +253,27 @@
"FOO" =~ /foo/; # just /i implied
use re 'debug'; # output debugging info during
- /^(.*)$/s; # compile and run time
+ /^(.*)$/s; # compile and run time
- use re 'debugcolor'; # same as 'debug', but with colored output
+ use re 'debugcolor'; # same as 'debug', but with colored
+ # output
...
- use re qw(Debug All); # Finer tuned debugging options.
- use re qw(Debug More);
- no re qw(Debug ALL); # Turn of all re debugging in this scope
+ use re qw(Debug All); # Same as "use re 'debug'", but you
+ # can use "Debug" with things other
+ # than 'All'
+ use re qw(Debug More); # 'All' plus output more details
+ no re qw(Debug ALL); # Turn on (almost) all re debugging
+ # in this scope
use re qw(is_regexp regexp_pattern); # import utility functions
my ($pat,$mods)=regexp_pattern(qr/foo/i);
if (is_regexp($obj)) {
print "Got regexp: ",
- scalar regexp_pattern($obj); # just as perl would stringify it
- } # but no hassle with blessed re's.
+ scalar regexp_pattern($obj); # just as perl would stringify
+ } # it but no hassle with blessed
+ # re's.
(We use $^X in these examples because it's tainted by default.)
@@ -288,8 +291,9 @@
When C<use re 'eval'> is in effect, a regexp is allowed to contain
C<(?{ ... })> zero-width assertions and C<(??{ ... })> postponed
-subexpressions, even if the regular expression contains
-variable interpolation. That is normally disallowed, since it is a
+subexpressions that are derived from variable interpolation, rather than
+appearing literally within the regexp. That is normally disallowed, since
+it is a
potential security risk. Note that this pragma is ignored when the regular
expression is obtained from tainted data, i.e. evaluation is always
disallowed with tainted regular expressions. See L<perlre/(?{ code })>
@@ -412,7 +416,7 @@
=item INTUIT
-Enable debugging of start point optimisations.
+Enable debugging of start-point optimisations.
=back
@@ -446,7 +450,7 @@
=item OPTIMISEM
-Enable enhanced optimisation debugging and start point optimisations.
+Enable enhanced optimisation debugging and start-point optimisations.
Probably not useful except when debugging the regexp engine itself.
=item OFFSETS
@@ -479,7 +483,8 @@
=item ALL
-Enable all options at once except OFFSETS, OFFSETSDBG and BUFFERS
+Enable all options at once except OFFSETS, OFFSETSDBG and BUFFERS.
+(To get every single option without exception, use both ALL and EXTRA.)
=item All
@@ -491,7 +496,7 @@
=item More
-Enable TRIEM and all execute compile and execute options.
+Enable the options enabled by "All", plus STATE, TRIEC, and TRIEM.
=back
@@ -498,7 +503,7 @@
=back
As of 5.9.5 the directive C<use re 'debug'> and its equivalents are
-lexically scoped, as the other directives are. However they have both
+lexically scoped, as are the other directives. However they have both
compile-time and run-time effects.
=head2 Exportable Functions
Property changes on: trunk/contrib/perl/ext/re/re.pm
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1.1.3
\ No newline at end of property
Modified: trunk/contrib/perl/ext/re/re.xs
===================================================================
--- trunk/contrib/perl/ext/re/re.xs 2013-12-02 21:28:58 UTC (rev 6443)
+++ trunk/contrib/perl/ext/re/re.xs 2013-12-02 21:30:11 UTC (rev 6444)
@@ -12,6 +12,10 @@
START_EXTERN_C
extern REGEXP* my_re_compile (pTHX_ SV * const pattern, const U32 pm_flags);
+extern REGEXP* my_re_op_compile (pTHX_ SV ** const patternp, int pat_count,
+ OP *expr, const regexp_engine* eng, REGEXP *VOL old_re,
+ bool *is_bare_re, U32 rx_flags, U32 pm_flags);
+
extern I32 my_regexec (pTHX_ REGEXP * const prog, char* stringarg, char* strend,
char* strbeg, I32 minend, SV* screamer,
void* data, U32 flags);
@@ -57,8 +61,9 @@
my_reg_named_buff_iter,
my_reg_qr_package,
#if defined(USE_ITHREADS)
- my_regdupe
+ my_regdupe,
#endif
+ my_re_op_compile,
};
MODULE = re PACKAGE = re
@@ -95,8 +100,9 @@
} else if (RX_FLOAT_UTF8(re)) {
fl = sv_2mortal(newSVsv(RX_FLOAT_UTF8(re)));
}
- XPUSHs(an);
- XPUSHs(fl);
+ EXTEND(SP, 2);
+ PUSHs(an);
+ PUSHs(fl);
XSRETURN(2);
}
XSRETURN_UNDEF;
Property changes on: trunk/contrib/perl/ext/re/re.xs
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1.1.3
\ No newline at end of property
Index: trunk/contrib/perl/ext/re/re_comp.h
===================================================================
--- trunk/contrib/perl/ext/re/re_comp.h 2013-12-02 21:28:58 UTC (rev 6443)
+++ trunk/contrib/perl/ext/re/re_comp.h 2013-12-02 21:30:11 UTC (rev 6444)
Property changes on: trunk/contrib/perl/ext/re/re_comp.h
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1.1.1
\ No newline at end of property
Modified: trunk/contrib/perl/ext/re/re_top.h
===================================================================
--- trunk/contrib/perl/ext/re/re_top.h 2013-12-02 21:28:58 UTC (rev 6443)
+++ trunk/contrib/perl/ext/re/re_top.h 2013-12-02 21:30:11 UTC (rev 6444)
@@ -13,6 +13,7 @@
#define Perl_regprop my_regprop
#define Perl_re_intuit_start my_re_intuit_start
#define Perl_re_compile my_re_compile
+#define Perl_re_op_compile my_re_op_compile
#define Perl_regfree_internal my_regfree
#define Perl_re_intuit_string my_re_intuit_string
#define Perl_regdupe_internal my_regdupe
@@ -35,8 +36,8 @@
* Local variables:
* c-indentation-style: bsd
* c-basic-offset: 4
- * indent-tabs-mode: t
+ * indent-tabs-mode: nil
* End:
*
- * ex: set ts=8 sts=4 sw=4 noet:
+ * ex: set ts=8 sts=4 sw=4 et:
*/
Property changes on: trunk/contrib/perl/ext/re/re_top.h
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1.1.1
\ No newline at end of property
Index: trunk/contrib/perl/ext/re/t/lexical_debug.pl
===================================================================
--- trunk/contrib/perl/ext/re/t/lexical_debug.pl 2013-12-02 21:28:58 UTC (rev 6443)
+++ trunk/contrib/perl/ext/re/t/lexical_debug.pl 2013-12-02 21:30:11 UTC (rev 6444)
Property changes on: trunk/contrib/perl/ext/re/t/lexical_debug.pl
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1.1.1
\ No newline at end of property
Index: trunk/contrib/perl/ext/re/t/lexical_debug.t
===================================================================
--- trunk/contrib/perl/ext/re/t/lexical_debug.t 2013-12-02 21:28:58 UTC (rev 6443)
+++ trunk/contrib/perl/ext/re/t/lexical_debug.t 2013-12-02 21:30:11 UTC (rev 6444)
Property changes on: trunk/contrib/perl/ext/re/t/lexical_debug.t
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1.1.2
\ No newline at end of property
Index: trunk/contrib/perl/ext/re/t/qr.t
===================================================================
--- trunk/contrib/perl/ext/re/t/qr.t 2013-12-02 21:28:58 UTC (rev 6443)
+++ trunk/contrib/perl/ext/re/t/qr.t 2013-12-02 21:30:11 UTC (rev 6444)
Property changes on: trunk/contrib/perl/ext/re/t/qr.t
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1.1.2
\ No newline at end of property
Modified: trunk/contrib/perl/ext/re/t/re.t
===================================================================
--- trunk/contrib/perl/ext/re/t/re.t 2013-12-02 21:28:58 UTC (rev 6443)
+++ trunk/contrib/perl/ext/re/t/re.t 2013-12-02 21:30:11 UTC (rev 6444)
@@ -10,7 +10,7 @@
use strict;
-use Test::More tests => 13;
+use Test::More tests => 15;
require_ok( 're' );
# setcolor
@@ -63,6 +63,11 @@
eval"no re Debug=>'ALL'";
ok( $ok, 'No segv!' );
+my $message = "Don't tread on me";
+$_ = $message;
+re->import("/aa");
+is($_, $message, "re doesn't clobber \$_");
+
package Term::Cap;
sub Tgetent {
@@ -72,3 +77,12 @@
sub Tputs {
return $_[1];
}
+
+package main;
+
+{
+ my $w;
+ local $SIG{__WARN__} = sub { warn shift; ++$w };
+ re->import();
+ is $w, undef, 'no warning for "use re;" (which is not useless)';
+}
Property changes on: trunk/contrib/perl/ext/re/t/re.t
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1.1.2
\ No newline at end of property
Index: trunk/contrib/perl/ext/re/t/re_funcs.t
===================================================================
--- trunk/contrib/perl/ext/re/t/re_funcs.t 2013-12-02 21:28:58 UTC (rev 6443)
+++ trunk/contrib/perl/ext/re/t/re_funcs.t 2013-12-02 21:30:11 UTC (rev 6444)
Property changes on: trunk/contrib/perl/ext/re/t/re_funcs.t
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1.1.3
\ No newline at end of property
Modified: trunk/contrib/perl/ext/re/t/re_funcs_u.t
===================================================================
--- trunk/contrib/perl/ext/re/t/re_funcs_u.t 2013-12-02 21:28:58 UTC (rev 6443)
+++ trunk/contrib/perl/ext/re/t/re_funcs_u.t 2013-12-02 21:30:11 UTC (rev 6444)
@@ -41,7 +41,7 @@
@names = sort +regnames(0);
is("@names","A B","regnames");
my $names = regnames();
- is($names, "B", "regnames in scalar context");
+ ok(($names eq "B" || $names eq "A"), "regnames in scalar context");
@names = sort +regnames(1);
is("@names","A B C","regnames");
is(join("", @{regname("A",1)}),"13");
@@ -92,6 +92,7 @@
SKIP: {
skip_if_miniperl("no dynamic loading on miniperl, no POSIX", 3);
+ skip 'No locale testing without d_setlocale', 3 if(!$Config::Config{d_setlocale});
require POSIX;
my $current_locale = POSIX::setlocale( &POSIX::LC_CTYPE, 'de_DE.ISO-8859-1' );
if ( !$current_locale || $current_locale ne 'de_DE.ISO-8859-1' ) {
@@ -108,6 +109,7 @@
SKIP: {
skip_if_miniperl("no dynamic loading on miniperl, no POSIX", 3);
+ skip 'No locale testing without d_setlocale', 3 if(!$Config::Config{d_setlocale});
require POSIX;
my $current_locale = POSIX::setlocale( &POSIX::LC_CTYPE, 'C' );
if ( !$current_locale || $current_locale ne 'C' ) {
Property changes on: trunk/contrib/perl/ext/re/t/re_funcs_u.t
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1.1.2
\ No newline at end of property
Modified: trunk/contrib/perl/ext/re/t/reflags.t
===================================================================
--- trunk/contrib/perl/ext/re/t/reflags.t 2013-12-02 21:28:58 UTC (rev 6443)
+++ trunk/contrib/perl/ext/re/t/reflags.t 2013-12-02 21:30:11 UTC (rev 6444)
@@ -10,26 +10,35 @@
use strict;
-use Test::More tests => 53;
+use Test::More tests => 62;
my @flags = qw( a d l u );
use re '/i';
ok "Foo" =~ /foo/, 'use re "/i"';
+ok "Foo" =~ /(??{'foo'})/, 'use re "/i" (??{})';
no re '/i';
ok "Foo" !~ /foo/, 'no re "/i"';
+ok "Foo" !~ /(??{'foo'})/, 'no re "/i" (??{})';
use re '/x';
ok "foo" =~ / foo /, 'use re "/x"';
+ok "foo" =~ / (??{' foo '}) /, 'use re "/x" (??{})';
no re '/x';
ok "foo" !~ / foo /, 'no re "/x"';
+ok "foo" !~ /(??{' foo '})/, 'no re "/x" (??{})';
+ok "foo" !~ / (??{'foo'}) /, 'no re "/x" (??{})';
use re '/s';
ok "\n" =~ /./, 'use re "/s"';
+ok "\n" =~ /(??{'.'})/, 'use re "/s" (??{})';
no re '/s';
ok "\n" !~ /./, 'no re "/s"';
+ok "\n" !~ /(??{'.'})/, 'no re "/s" (??{})';
use re '/m';
ok "\nfoo" =~ /^foo/, 'use re "/m"';
+ok "\nfoo" =~ /(??{'^'})foo/, 'use re "/m" (??{})';
no re '/m';
ok "\nfoo" !~ /^foo/, 'no re "/m"';
+ok "\nfoo" !~ /(??{'^'})foo/, 'no re "/m" (??{})';
use re '/xism';
ok qr// =~ /(?=.*x)(?=.*i)(?=.*s)(?=.*m)/, 'use re "/multiple"';
@@ -51,7 +60,11 @@
) {
skip "no locale support", 7
}
- use locale;
+ BEGIN {
+ if($Config::Config{d_setlocale}) {
+ require locale; import locale;
+ }
+ }
use re '/u';
is qr//, '(?^u:)', 'use re "/u" with active locale';
no re '/u';
@@ -107,14 +120,10 @@
use re '/xi';
ok "A\n\n" =~ / a.$/sm, 'use re "/xi" in combination with explicit /sm';
{
- local $::TODO = "test requires perl 5.16 syntax";
- # (remove the evals, the quotes, and the ‘no warnings’ when removing the
- # to-do notice)
- no warnings;
use re '/u';
- is eval 'qr//d', '(?^:)', 'explicit /d in re "/u" scope';
+ is qr//d, '(?^ix:)', 'explicit /d in re "/u" scope';
use re '/d';
- is eval 'qr//u', '(?^u:)', 'explicit /u in re "/d" scope';
+ is qr//u, '(?^uix:)', 'explicit /u in re "/d" scope';
}
no re '/x';
Property changes on: trunk/contrib/perl/ext/re/t/reflags.t
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1.1.1
\ No newline at end of property
Index: trunk/contrib/perl/ext/re/t/regop.pl
===================================================================
--- trunk/contrib/perl/ext/re/t/regop.pl 2013-12-02 21:28:58 UTC (rev 6443)
+++ trunk/contrib/perl/ext/re/t/regop.pl 2013-12-02 21:30:11 UTC (rev 6444)
Property changes on: trunk/contrib/perl/ext/re/t/regop.pl
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1.1.1
\ No newline at end of property
Modified: trunk/contrib/perl/ext/re/t/regop.t
===================================================================
--- trunk/contrib/perl/ext/re/t/regop.t 2013-12-02 21:28:58 UTC (rev 6443)
+++ trunk/contrib/perl/ext/re/t/regop.t 2013-12-02 21:30:11 UTC (rev 6444)
@@ -14,7 +14,7 @@
chomp(my @strs= grep { !/^\s*\#/ } <DATA>);
my $out = runperl(progfile => "t/regop.pl", stderr => 1 );
# VMS currently embeds linefeeds in the output.
-$out =~ s/\cJ//g if $^O = 'VMS';
+$out =~ s/\cJ//g if $^O == 'VMS';
my @tests = grep { /\S/ } split /(?=Compiling REx)/, $out;
# on debug builds we get an EXECUTING... message in there at the top
shift @tests
@@ -241,13 +241,13 @@
#Matching stclass EXACTF <.> against ".exe"
---
#Compiling REx "[q]"
-#size 12 nodes Got 100 bytes for offset annotations.
+#size 3 nodes Got 28 bytes for offset annotations.
#first at 1
#Final program:
# 1: EXACT <q>(3)
# 3: END(0)
#anchored "q" at 0 (checking anchored isall) minlen 1
-#Offsets: [12]
+#Offsets: [3]
# 1:1[3] 3:4[0]
#Guessing start of match, REx "[q]" against "q"...
#Found anchored substr "q" at offset 0...
@@ -254,8 +254,8 @@
#Guessed: match at offset 0
#%MATCHED%
#Freeing REx: "[q]"
-Got 100 bytes for offset annotations.
-Offsets: [12]
+Got 28 bytes for offset annotations.
+Offsets: [3]
1:1[3] 3:4[0]
%MATCHED%
Freeing REx: "[q]"
Property changes on: trunk/contrib/perl/ext/re/t/regop.t
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1.1.2
\ No newline at end of property
Index: trunk/contrib/perl/mkppport
===================================================================
--- trunk/contrib/perl/mkppport 2013-12-02 21:28:58 UTC (rev 6443)
+++ trunk/contrib/perl/mkppport 2013-12-02 21:30:11 UTC (rev 6444)
Property changes on: trunk/contrib/perl/mkppport
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1.1.3
\ No newline at end of property
Modified: trunk/contrib/perl/mkppport.lst
===================================================================
--- trunk/contrib/perl/mkppport.lst 2013-12-02 21:28:58 UTC (rev 6443)
+++ trunk/contrib/perl/mkppport.lst 2013-12-02 21:30:11 UTC (rev 6444)
@@ -7,6 +7,7 @@
cpan/DB_File
cpan/IPC-SysV
+cpan/List-Util
cpan/Time-HiRes
cpan/Win32API-File
dist/Cwd
Property changes on: trunk/contrib/perl/mkppport.lst
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1.1.3
\ No newline at end of property
More information about the Midnightbsd-cvs
mailing list