Skip to content

feature 'apostrophe_as_package_separator' #22675

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from
1 change: 1 addition & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -6105,6 +6105,7 @@ t/lib/Devel/switchd_empty.pm Module for t/run/switchd.t
t/lib/Devel/switchd_goto.pm Module for t/run/switchd.t
t/lib/Dies.pm For test case in op/require_errors.t
t/lib/feature/api Test API for checking features enabled/disabled
t/lib/feature/apos_as_pack_sep Tests for enabling/disabling apostrophe_as_package_separator feature
t/lib/feature/bareword_filehandles Tests for enabling/disabling bareword_filehandles feature
t/lib/feature/bits Tests for feature bit handling
t/lib/feature/bundle Tests for feature bundles
Expand Down
8 changes: 0 additions & 8 deletions cpan/Scalar-List-Utils/ListUtil.xs
Original file line number Diff line number Diff line change
Expand Up @@ -1951,10 +1951,8 @@ PREINIT:
STRLEN namelen;
const char* nameptr = SvPV(name, namelen);
int utf8flag = SvUTF8(name);
#if PERL_VERSION_LT(5, 41, 3)
int quotes_seen = 0;
bool need_subst = FALSE;
#endif
PPCODE:
if (!SvROK(sub) && SvGMAGICAL(sub))
mg_get(sub);
Expand All @@ -1977,23 +1975,18 @@ PPCODE:
if (s > nameptr && *s == ':' && s[-1] == ':') {
end = s - 1;
begin = ++s;
#if PERL_VERSION_LT(5, 41, 3)
if (quotes_seen)
need_subst = TRUE;
#endif
}
#if PERL_VERSION_LT(5, 41, 3)
else if (s > nameptr && *s != '\0' && s[-1] == '\'') {
end = s - 1;
begin = s;
if (quotes_seen++)
need_subst = TRUE;
}
#endif
}
s--;
if (end) {
#if PERL_VERSION_LT(5, 41, 3)
SV* tmp;
if (need_subst) {
STRLEN length = end - nameptr + quotes_seen - (*end == '\'' ? 1 : 0);
Expand All @@ -2013,7 +2006,6 @@ PPCODE:
stash = gv_stashpvn(left, length, GV_ADD | utf8flag);
}
else
#endif
stash = gv_stashpvn(nameptr, end - nameptr, GV_ADD | utf8flag);
nameptr = begin;
namelen -= begin - nameptr;
Expand Down
2 changes: 1 addition & 1 deletion cpan/Scalar-List-Utils/lib/List/Util.pm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ our @EXPORT_OK = qw(
sample shuffle uniq uniqint uniqnum uniqstr zip zip_longest zip_shortest mesh mesh_longest mesh_shortest
head tail pairs unpairs pairkeys pairvalues pairmap pairgrep pairfirst
);
our $VERSION = "1.68";
our $VERSION = "1.68_01";
our $XS_VERSION = $VERSION;
$VERSION =~ tr/_//d;

Expand Down
2 changes: 1 addition & 1 deletion cpan/Scalar-List-Utils/lib/List/Util/XS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use strict;
use warnings;
use List::Util;

our $VERSION = "1.68"; # FIXUP
our $VERSION = "1.68_01"; # FIXUP
$VERSION =~ tr/_//d; # FIXUP

1;
Expand Down
2 changes: 1 addition & 1 deletion cpan/Scalar-List-Utils/lib/Scalar/Util.pm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ our @EXPORT_OK = qw(
dualvar isdual isvstring looks_like_number openhandle readonly set_prototype
tainted
);
our $VERSION = "1.68";
our $VERSION = "1.68_01";
$VERSION =~ tr/_//d;

require List::Util; # List::Util loads the XS
Expand Down
2 changes: 1 addition & 1 deletion cpan/Scalar-List-Utils/lib/Sub/Util.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ our @EXPORT_OK = qw(
subname set_subname
);

our $VERSION = "1.68";
our $VERSION = "1.68_01";
$VERSION =~ tr/_//d;

require List::Util; # as it has the XS
Expand Down
6 changes: 3 additions & 3 deletions cpan/Scalar-List-Utils/t/exotic_names.t
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ sub caller3_ok {
),
);

$expected =~ s/'/::/g if $] < 5.041_003;
$expected =~ s/'/::/g if $] < 5.037009 || $] >= 5.041_004;

# this is apparently how things worked before 5.16
utf8::encode($expected) if $] < 5.016 and $ord > 255;
Expand All @@ -72,7 +72,7 @@ my @ordinal = (
($] >= 5.014 ? ( 0 ) : ()),
1 .. 38,
# single quote ' separators are deprecated in 5.37.9
($] < 5.037009 ? ( 39 ) : ()),
($] < 5.037009 || $] >= 5.041_004 ? ( 39 ) : ()),
40 .. 255,
# Unicode in 5.6 is not sane (crashes etc)
($] >= 5.008 ? (
Expand All @@ -85,7 +85,7 @@ my @ordinal = (

my $legal_ident_char = join('',
"A-Z_a-z0-9",
($] < 5.037009 ? q['] : ()),
($] < 5.037009 || $] >= 5.041_004 ? q['] : ()),
($] > 5.008 ? (
map chr, 0x100, 0x498
) : ()),
Expand Down
2 changes: 1 addition & 1 deletion cpan/parent/lib/parent.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package parent;
use strict;

our $VERSION = '0.242';
our $VERSION = '0.242_001';

sub import {
my $class = shift;
Expand Down
15 changes: 7 additions & 8 deletions cpan/parent/t/compile-time-file.t
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use lib 't/lib';

{
package Child3;
use if $] < 5.041_003, parent => "Dummy'Outside";
use if $] != 5.041_003, parent => "Dummy'Outside";
}

my $obj = {};
Expand All @@ -41,11 +41,10 @@ is $obj->exclaim, "I CAN FROM Dummy::InlineChild", 'Inheritance is set up correc

SKIP:
{
skip "No ' in names from 5.041_003", 3 if $] >= 5.041_003;
$obj = {};
bless $obj, 'Child3';
isa_ok $obj, 'Dummy::Outside';
can_ok $obj, 'exclaim';
is $obj->exclaim, "I CAN FROM Dummy::Outside", "Inheritance is set up correctly for classes inherited from via '";

skip "No ' in names in 5.041_003", 3 if $] == 5.041_003;
$obj = {};
bless $obj, 'Child3';
isa_ok $obj, 'Dummy::Outside';
can_ok $obj, 'exclaim';
is $obj->exclaim, "I CAN FROM Dummy::Outside", "Inheritance is set up correctly for classes inherited from via '";
}
95 changes: 61 additions & 34 deletions feature.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading