summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDagfinn Ilmari Mannsåker <ilmari@ilmari.org>2016-01-18 12:52:29 +0000
committerSawyer X <xsawyerx@cpan.org>2017-06-01 10:53:44 +0200
commit01cb645528690d8065b86c3a0db2738055e142de (patch)
tree96199a34e956bf7551da0d54634c6565b40168ed
parentcfdc35fc22e32a4383f59856f093e3f386a646b7 (diff)
downloadperl-01cb645528690d8065b86c3a0db2738055e142de.tar.gz
Remove deprecated no-op :locked attribute
It's been a no-op since 5.10 and deprecated since 5.12.
-rw-r--r--dist/Attribute-Handlers/lib/Attribute/Handlers.pm2
-rw-r--r--ext/attributes/attributes.pm7
-rw-r--r--lib/B/Deparse.pm3
-rw-r--r--pod/perldiag.pod7
-rw-r--r--t/lib/warnings/toke17
-rw-r--r--t/op/attrs.t5
-rw-r--r--toke.c5
7 files changed, 4 insertions, 42 deletions
diff --git a/dist/Attribute-Handlers/lib/Attribute/Handlers.pm b/dist/Attribute-Handlers/lib/Attribute/Handlers.pm
index 710fe0839d..67e4dc74ac 100644
--- a/dist/Attribute-Handlers/lib/Attribute/Handlers.pm
+++ b/dist/Attribute-Handlers/lib/Attribute/Handlers.pm
@@ -140,7 +140,7 @@ sub AUTOLOAD {
}
my $builtin = $] ge '5.027000'
- ? qr/lvalue|method|locked|shared/
+ ? qr/lvalue|method|shared/
: qr/lvalue|method|locked|shared|unique/;
sub _gen_handler_AH_() {
diff --git a/ext/attributes/attributes.pm b/ext/attributes/attributes.pm
index 85ec9ce4cb..3a3a43ea5b 100644
--- a/ext/attributes/attributes.pm
+++ b/ext/attributes/attributes.pm
@@ -19,7 +19,6 @@ sub carp {
}
my %deprecated;
-$deprecated{CODE} = qr/\A-?(locked)\z/;
my %msg = (
lvalue => 'lvalue attribute applied to already-defined subroutine',
@@ -254,12 +253,6 @@ C<sub foo($$) : prototype(@) {}> is indistinguishable from C<sub foo(@){}>.
If illegalproto warnings are enabled, the prototype declared inside this
attribute will be sanity checked at compile time.
-=item locked
-
-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". It will
-disappear in Perl 5.28, after which its use will be fatal.
-
=item const
This experimental attribute, introduced in Perl 5.22, only applies to
diff --git a/lib/B/Deparse.pm b/lib/B/Deparse.pm
index 3166415b54..6c35a7275e 100644
--- a/lib/B/Deparse.pm
+++ b/lib/B/Deparse.pm
@@ -47,7 +47,7 @@ use B qw(class main_root main_start main_cv svref_2object opnumber perlstring
MDEREF_SHIFT
);
-$VERSION = '1.40';
+$VERSION = '1.41';
use strict;
use vars qw/$AUTOLOAD/;
use warnings ();
@@ -1334,7 +1334,6 @@ Carp::confess("SPECIAL in deparse_sub") if $cv->isa("B::SPECIAL");
}
if ($cv->CvFLAGS & (CVf_METHOD|CVf_LOCKED|CVf_LVALUE|CVf_ANONCONST)) {
push @attrs, "lvalue" if $cv->CvFLAGS & CVf_LVALUE;
- push @attrs, "locked" if $cv->CvFLAGS & CVf_LOCKED;
push @attrs, "method" if $cv->CvFLAGS & CVf_METHOD;
push @attrs, "const" if $cv->CvFLAGS & CVf_ANONCONST;
}
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index 25f4c68efa..5652b10b6b 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -418,13 +418,6 @@ assigning through that reference. For example
used as an lvalue, which is pretty strange. Perhaps you forgot to
dereference it first. See L<perlfunc/substr>.
-=item Attribute "locked" is deprecated, and will disappear in Perl 5.28
-
-(D deprecated) You have used the attributes pragma to modify the
-"locked" attribute on a code reference. The :locked attribute is
-obsolete, has had no effect since 5005 threads were removed, and
-will be removed in a Perl 5.28.
-
=item Attribute prototype(%s) discards earlier prototype attribute in same sub
(W misc) A sub was declared as sub foo : prototype(A) : prototype(B) {}, for
diff --git a/t/lib/warnings/toke b/t/lib/warnings/toke
index 564174c5e6..49fa97ea8e 100644
--- a/t/lib/warnings/toke
+++ b/t/lib/warnings/toke
@@ -1250,23 +1250,6 @@ EXPECT
!=~ should be !~ at - line 9.
########
# toke.c
-sub pam :locked;
-sub glipp :locked {
-}
-sub whack_eth ($) : locked {
-}
-no warnings 'deprecated';
-sub zapeth :locked;
-sub ker_plop :locked {
-}
-sub swa_a_p ($) : locked {
-}
-EXPECT
-Attribute "locked" is deprecated, and will disappear in Perl 5.28 at - line 3.
-Attribute "locked" is deprecated, and will disappear in Perl 5.28 at - line 4.
-Attribute "locked" is deprecated, and will disappear in Perl 5.28 at - line 6.
-########
-# toke.c
use warnings "syntax";
sub proto_after_array(@$);
sub proto_after_arref(\@$);
diff --git a/t/op/attrs.t b/t/op/attrs.t
index eb31b181fe..2514270eda 100644
--- a/t/op/attrs.t
+++ b/t/op/attrs.t
@@ -160,14 +160,13 @@ like $@, qr/Can't declare scalar dereference in "my"/;
my @code = qw(lvalue method);
my @other = qw(shared);
-my @deprecated = qw(locked);
-my @invalid = qw(unique);
+my @deprecated = qw();
+my @invalid = qw(unique locked);
my %valid;
$valid{CODE} = {map {$_ => 1} @code};
$valid{SCALAR} = {map {$_ => 1} @other};
$valid{ARRAY} = $valid{HASH} = $valid{SCALAR};
my %deprecated;
-$deprecated{CODE} = { locked => 1 };
our ($scalar, @array, %hash);
foreach my $value (\&foo, \$scalar, \@array, \%hash) {
diff --git a/toke.c b/toke.c
index 0f37b8bea9..ce6fe22162 100644
--- a/toke.c
+++ b/toke.c
@@ -5896,11 +5896,6 @@ Perl_yylex(pTHX)
sv_free(sv);
CvLVALUE_on(PL_compcv);
}
- else if (!PL_in_my && len == 6 && strnEQ(SvPVX(sv), "locked", len)) {
- sv_free(sv);
- deprecate_disappears_in("5.28",
- "Attribute \"locked\" is deprecated");
- }
else if (!PL_in_my && len == 6 && strnEQ(SvPVX(sv), "method", len)) {
sv_free(sv);
CvMETHOD_on(PL_compcv);