develooper Front page | perl.perl5.porters | Postings from July 2013

Things that have been deprecated for a long time

Thread Next
From:
Ed Avis
Date:
July 3, 2013 14:03
Subject:
Things that have been deprecated for a long time
Message ID:
loom.20130703T155458-464@post.gmane.org
With the recent discussion about deprecation and removal of bare <<, I went
to look for other dusty corners of perl which have been marked as
'deprecated' for many years but are still in the language.  I took 5.10.0
as the base version and grepped.

I have excluded from the list below deprecations affecting XS code or
perl internals, or core modules.

my $x if 0;                 # since 5.9.1

defined(@x) and defined(%h) # since 5.6.1 or earlier

sub foo {} do foo(1,2)      # since 5.10 or earlier

chdir('')                   # since 5.10 or earlier

%h->{a} and @a->[5]         # since 5.7.2; code committed 2001-05-08

?PATTERN?                   # since 5.10 or earlier

$[ = 5;                     # since 5.10 or earlier

dump                        # since 5.8

Unrecognized escape \8      # since 5.8

sub foo (@bar) {}           # since 5.8

::DESTROY                   # code committed 2002-03-16

use UNIVERSAL;              # since 5.004_02

If the perl5-porters wish it, I can file RT bugs for these, together or
separately.

In my experience the first two constructs still regularly appear in
beginner code, and for that reason it would be good to finally disallow
them.

-- 
Ed Avis <eda@waniasset.com>


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About