summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-03-14 17:02:38 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-03-14 17:02:38 +0000
commit1108974dc425da181c3fc8be06ee65371f6439d6 (patch)
treeccc23831bb5d7a751378e30431e78b78ec7c702b /toke.c
parent90cd13a29feb8c9646bbe3dfa9e5a556f3e5d9ce (diff)
downloadperl-1108974dc425da181c3fc8be06ee65371f6439d6.tar.gz
Make usage of :unique emit a deprecation warning.
Remove its outdated documentation. p4raw-id: //depot/perl@27498
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/toke.c b/toke.c
index f256310bea..545116f61d 100644
--- a/toke.c
+++ b/toke.c
@@ -4022,12 +4022,14 @@ Perl_yylex(pTHX)
}
else {
if (len == 6 && strnEQ(s, "unique", len)) {
- if (PL_in_my == KEY_our)
+ if (PL_in_my == KEY_our) {
#ifdef USE_ITHREADS
GvUNIQUE_on(cGVOPx_gv(yylval.opval));
#else
- /*EMPTY*/; /* skip to avoid loading attributes.pm */
+ /* skip to avoid loading attributes.pm */
+ deprecate(":unique");
#endif
+ }
else
Perl_croak(aTHX_ "The 'unique' attribute may only be applied to 'our' variables");
}