diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-03-14 17:02:38 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-03-14 17:02:38 +0000 |
commit | 1108974dc425da181c3fc8be06ee65371f6439d6 (patch) | |
tree | ccc23831bb5d7a751378e30431e78b78ec7c702b /toke.c | |
parent | 90cd13a29feb8c9646bbe3dfa9e5a556f3e5d9ce (diff) | |
download | perl-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.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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"); } |