diff options
author | Steffen Mueller <smueller@cpan.org> | 2010-04-05 15:15:38 +0200 |
---|---|---|
committer | Jesse Vincent <jesse@bestpractical.com> | 2010-04-05 09:19:55 -0400 |
commit | 870abcc9ec31b0ec6d369f95516616d679e92b99 (patch) | |
tree | 238245c4c806e9b69f015ba7b667bb440a32b748 | |
parent | 5e1d1895f3110c06f0dcf8fe607e40631f462791 (diff) | |
download | perl-870abcc9ec31b0ec6d369f95516616d679e92b99.tar.gz |
Remove perl4-library deprecation warnings
After the recent, long discussion about this topic and demonstrated
cases where the deprecation warnings may actually *break* things, we
agreed on IRC to push the "active" deprecation warnings to after 5.12.
--Steffen
From f1b2d650aa126e06fc270dd0a44b8a6bf0da6e2c Mon Sep 17 00:00:00 2001
From: Steffen Mueller <smueller@cpan.org>
Date: Mon, 5 Apr 2010 15:12:41 +0200
Subject: [PATCH] Remove deprecation warnings from perl4-era tools
The libraries still have deprecation warnings in their comments but the
mandatory run-time warnings are disabled until after 5.12.
-rw-r--r-- | lib/abbrev.pl | 4 | ||||
-rw-r--r-- | lib/assert.pl | 9 | ||||
-rw-r--r-- | lib/bigfloat.pl | 4 | ||||
-rw-r--r-- | lib/bigint.pl | 4 | ||||
-rw-r--r-- | lib/bigrat.pl | 4 | ||||
-rw-r--r-- | lib/cacheout.pl | 4 | ||||
-rw-r--r-- | lib/complete.pl | 4 | ||||
-rw-r--r-- | lib/ctime.pl | 4 | ||||
-rw-r--r-- | lib/dotsh.pl | 5 | ||||
-rw-r--r-- | lib/exceptions.pl | 3 | ||||
-rw-r--r-- | lib/fastcwd.pl | 4 | ||||
-rw-r--r-- | lib/find.pl | 4 | ||||
-rw-r--r-- | lib/finddepth.pl | 4 | ||||
-rw-r--r-- | lib/flush.pl | 4 | ||||
-rw-r--r-- | lib/getcwd.pl | 4 | ||||
-rw-r--r-- | lib/getopt.pl | 4 | ||||
-rw-r--r-- | lib/getopts.pl | 4 | ||||
-rw-r--r-- | lib/hostname.pl | 4 | ||||
-rw-r--r-- | lib/importenv.pl | 4 | ||||
-rw-r--r-- | lib/look.pl | 3 | ||||
-rw-r--r-- | lib/newgetopt.pl | 4 | ||||
-rw-r--r-- | lib/open2.pl | 4 | ||||
-rw-r--r-- | lib/open3.pl | 4 | ||||
-rw-r--r-- | lib/pwd.pl | 4 | ||||
-rw-r--r-- | lib/shellwords.pl | 4 | ||||
-rw-r--r-- | lib/stat.pl | 3 | ||||
-rw-r--r-- | lib/tainted.pl | 3 | ||||
-rw-r--r-- | lib/termcap.pl | 4 | ||||
-rw-r--r-- | lib/timelocal.pl | 3 |
29 files changed, 6 insertions, 111 deletions
diff --git a/lib/abbrev.pl b/lib/abbrev.pl index eac0053ce7..cd20063f00 100644 --- a/lib/abbrev.pl +++ b/lib/abbrev.pl @@ -18,10 +18,6 @@ package abbrev; -warn( "The 'abbrev.pl' legacy library is deprecated and will be" - . " removed in the next major release of perl. Please use the" - . " Text::Abbrev module instead." ); - sub main'abbrev { local(*domain) = @_; shift(@_); diff --git a/lib/assert.pl b/lib/assert.pl index 768ae49570..2c2073c7ea 100644 --- a/lib/assert.pl +++ b/lib/assert.pl @@ -1,3 +1,9 @@ +# +# This library is no longer being maintained, and is included for backward +# compatibility with Perl 4 programs which may require it. +# This legacy library is deprecated and will be removed in a future +# release of perl. +# # assert.pl # tchrist@convex.com (Tom Christiansen) # @@ -11,9 +17,6 @@ # be printed out by &panic, which is just the stack-backtrace # routine shamelessly borrowed from the perl debugger. -warn( "The 'assert.pl' legacy library is deprecated and will be" - . " removed in the next major release of perl." ); - sub assert { &panic("ASSERTION BOTCHED: $_[$[]",$@) unless eval $_[$[]; } diff --git a/lib/bigfloat.pl b/lib/bigfloat.pl index 9f94e8498f..dd0bc05af2 100644 --- a/lib/bigfloat.pl +++ b/lib/bigfloat.pl @@ -11,10 +11,6 @@ require "bigint.pl"; # # Suggested alternative: Math::BigFloat -warn( "The 'bigfloat.pl' legacy library is deprecated and will be" - . " removed in the next major release of perl. Please use the" - . " Math::BigFloat module instead." ); - # Arbitrary length float math package # # by Mark Biggar diff --git a/lib/bigint.pl b/lib/bigint.pl index a31bfec82b..d28f0e27a0 100644 --- a/lib/bigint.pl +++ b/lib/bigint.pl @@ -10,10 +10,6 @@ package bigint; # # Suggested alternative: Math::BigInt -warn( "The 'bigint.pl' legacy library is deprecated and will be" - . " removed in the next major release of perl. Please use the" - . " Math::BigInt module instead." ); - # arbitrary size integer math package # # by Mark Biggar diff --git a/lib/bigrat.pl b/lib/bigrat.pl index f5378b8775..f3b599591e 100644 --- a/lib/bigrat.pl +++ b/lib/bigrat.pl @@ -11,10 +11,6 @@ require "bigint.pl"; # # Arbitrary size rational math package -warn( "The 'bigrat.pl' legacy library is deprecated and will be" - . " removed in the next major release of perl. Please use the" - . " bigrat module instead." ); - # by Mark Biggar # # Input values to these routines consist of strings of the form diff --git a/lib/cacheout.pl b/lib/cacheout.pl index 789c9102c5..368e98ee21 100644 --- a/lib/cacheout.pl +++ b/lib/cacheout.pl @@ -9,10 +9,6 @@ # # Suggested alternative: FileCache -warn( "The 'cacheout.pl' legacy library is deprecated and will be" - . " removed in the next major release of perl. Please use the" - . " FileCache module instead." ); - # Open in their package. sub cacheout'open { diff --git a/lib/complete.pl b/lib/complete.pl index 79a184a134..2fb3b33b85 100644 --- a/lib/complete.pl +++ b/lib/complete.pl @@ -10,10 +10,6 @@ # # Suggested alternative: Term::Complete -warn( "The 'complete.pl' legacy library is deprecated and will be" - . " removed in the next major release of perl. Please use the" - . " Term::Complete module instead." ); - ;# @(#)complete.pl,v1.1 (me@anywhere.EBay.Sun.COM) 09/23/91 ;# ;# Author: Wayne Thompson diff --git a/lib/ctime.pl b/lib/ctime.pl index 6f4016a226..1b91ec289f 100644 --- a/lib/ctime.pl +++ b/lib/ctime.pl @@ -10,10 +10,6 @@ # # Suggested alternative: the POSIX ctime function -warn( "The 'ctime.pl' legacy library is deprecated and will be" - . " removed in the next major release of perl. Please use the" - . " POSIX module (ctime function) instead." ); - ;# ;# Waldemar Kebsch, Federal Republic of Germany, November 1988 ;# kebsch.pad@nixpbe.UUCP diff --git a/lib/dotsh.pl b/lib/dotsh.pl index 0819e18c73..2ae88ba43d 100644 --- a/lib/dotsh.pl +++ b/lib/dotsh.pl @@ -33,11 +33,6 @@ # &dotsh ('/foo/bar arg1 ... argN'); # -warn( "The 'dotsh.pl' legacy library is deprecated and will be" - . " removed in the next major release of perl. Please use " - . " one of the related modules from CPAN instead." - . " (Shell::Source, Shell::GetEnv, ...)" ); - sub dotsh { local(@sh) = @_; local($tmp,$key,$shell,$command,$args,$vars) = ''; diff --git a/lib/exceptions.pl b/lib/exceptions.pl index 8c77a07827..09a4d3e7ae 100644 --- a/lib/exceptions.pl +++ b/lib/exceptions.pl @@ -9,9 +9,6 @@ # In particular, this should not be used as an example of modern Perl # programming techniques. -warn( "The 'exceptions.pl' legacy library is deprecated and will be" - . " removed in the next major release of perl." ); - # Here's a little code I use for exception handling. It's really just # glorfied eval/die. The way to use use it is when you might otherwise # exit, use &throw to raise an exception. The first enclosing &catch diff --git a/lib/fastcwd.pl b/lib/fastcwd.pl index 11133481dc..34b60f71a0 100644 --- a/lib/fastcwd.pl +++ b/lib/fastcwd.pl @@ -10,10 +10,6 @@ # # Suggested alternative: Cwd -warn( "The 'fastcwd.pl' legacy library is deprecated and will be" - . " removed in the next major release of perl. Please use the" - . " Cwd module instead." ); - # Usage: $cwd = &fastcwd; # # This is a faster version of getcwd. It's also more dangerous because diff --git a/lib/find.pl b/lib/find.pl index e8e4eb76d2..f79decf837 100644 --- a/lib/find.pl +++ b/lib/find.pl @@ -3,10 +3,6 @@ # removed in a future version of Perl. Please use the File::Find module # instead. -warn( "Please use the File::Find module instead of the deprecated" - ." 'find.pl' library, which will be removed in the next major" - ." release of perl" ); - # Usage: # require "find.pl"; # diff --git a/lib/finddepth.pl b/lib/finddepth.pl index 6a177c6113..331247ae29 100644 --- a/lib/finddepth.pl +++ b/lib/finddepth.pl @@ -3,10 +3,6 @@ # removed in a future version of Perl. Please use the File::Find module # instead. -warn( "Please use the File::Find module instead of the deprecated" - ." 'finddepth.pl' library, which will be removed in the next" - ." major release of perl" ); - # Usage: # require "finddepth.pl"; # diff --git a/lib/flush.pl b/lib/flush.pl index 577f7c7826..e621ff063c 100644 --- a/lib/flush.pl +++ b/lib/flush.pl @@ -9,10 +9,6 @@ # # Suggested alternative: IO::Handle -warn( "The 'flush.pl' legacy library is deprecated and will be" - . " removed in the next major release of perl. Please use the" - . " IO::Handle module instead." ); - ;# Usage: &flush(FILEHANDLE) ;# flushes the named filehandle diff --git a/lib/getcwd.pl b/lib/getcwd.pl index 571b319ea1..fcca2ced80 100644 --- a/lib/getcwd.pl +++ b/lib/getcwd.pl @@ -9,10 +9,6 @@ # # Suggested alternative: Cwd -warn( "The 'getcwd.pl' legacy library is deprecated and will be" - . " removed in the next major release of perl. Please use the" - . " Cwd module instead." ); - # # Usage: $cwd = &getcwd; diff --git a/lib/getopt.pl b/lib/getopt.pl index be393c4ac7..343921f39c 100644 --- a/lib/getopt.pl +++ b/lib/getopt.pl @@ -10,10 +10,6 @@ # # Suggested alternatives: Getopt::Long or Getopt::Std -warn( "The 'getopt.pl' legacy library is deprecated and will be" - . " removed in the next major release of perl. Please use the" - . " Getopt::Long or Getopt::Std modules instead." ); - ;# Process single-character switches with switch clustering. Pass one argument ;# which is a string containing all switches that take an argument. For each ;# switch found, sets $opt_x (where x is the switch name) to the value of the diff --git a/lib/getopts.pl b/lib/getopts.pl index ec1012a865..b2aa5cb60e 100644 --- a/lib/getopts.pl +++ b/lib/getopts.pl @@ -8,10 +8,6 @@ # # Suggested alternatives: Getopt::Long or Getopt::Std -warn( "The 'getopts.pl' legacy library is deprecated and will be" - . " removed in the next major release of perl. Please use the" - . " Getopt::Long or Getopt::Std module instead." ); - ;# Usage: ;# do Getopts('a:bc'); # -a takes arg. -b & -c not. Sets opt_* as a ;# # side effect. diff --git a/lib/hostname.pl b/lib/hostname.pl index cc37d49a33..33907c6cb7 100644 --- a/lib/hostname.pl +++ b/lib/hostname.pl @@ -10,10 +10,6 @@ # # Suggested alternative: Sys::Hostname -warn( "The 'hostname.pl' legacy library is deprecated and will be" - . " removed in the next major release of perl. Please use the" - . " Sys::Hostname module instead." ); - sub hostname { local(*P,@tmp,$hostname,$_); diff --git a/lib/importenv.pl b/lib/importenv.pl index 75274c2659..865a22652d 100644 --- a/lib/importenv.pl +++ b/lib/importenv.pl @@ -3,10 +3,6 @@ # This legacy library is deprecated and will be removed in a future # release of perl. -warn( "The 'importenv.pl' legacy library is deprecated and will be" - . " removed in the next major release of perl. Please use the" - . " Env::Export module (or similar) from CPAN instead." ); - ;# This file, when interpreted, pulls the environment into normal variables. ;# Usage: ;# require 'importenv.pl'; diff --git a/lib/look.pl b/lib/look.pl index fec31fed8c..f2a4e09dd6 100644 --- a/lib/look.pl +++ b/lib/look.pl @@ -8,9 +8,6 @@ # In particular, this should not be used as an example of modern Perl # programming techniques. -warn( "The 'look.pl' legacy library is deprecated and will be" - . " removed in the next major release of perl." ); - ;# Sets file position in FILEHANDLE to be first line greater than or equal ;# (stringwise) to $key. Pass flags for dictionary order and case folding. diff --git a/lib/newgetopt.pl b/lib/newgetopt.pl index e21d396536..d6d8b0b07b 100644 --- a/lib/newgetopt.pl +++ b/lib/newgetopt.pl @@ -11,10 +11,6 @@ # # Suggested alternative: Getopt::Long -warn( "The 'newgetopt.pl' legacy library is deprecated and will be" - . " removed in the next major release of perl. Please use the" - . " Getopt::Long module instead." ); - { package newgetopt; # Values for $order. See GNU getopt.c for details. diff --git a/lib/open2.pl b/lib/open2.pl index 5c24a3c1b2..96d80d7b26 100644 --- a/lib/open2.pl +++ b/lib/open2.pl @@ -10,10 +10,6 @@ # # require 'open2.pl'; -warn( "The 'open2.pl' legacy library is deprecated and will be" - . " removed in the next major release of perl. Please use the" - . " IPC::Open2 module instead." ); - package main; use IPC::Open2 'open2'; 1 diff --git a/lib/open3.pl b/lib/open3.pl index ab7fa5fe05..9a387eb9a0 100644 --- a/lib/open3.pl +++ b/lib/open3.pl @@ -10,10 +10,6 @@ # # require 'open3.pl'; -warn( "The 'open3.pl' legacy library is deprecated and will be" - . " removed in the next major release of perl. Please use the" - . " IPC::Open3 module instead." ); - package main; use IPC::Open3 'open3'; 1 diff --git a/lib/pwd.pl b/lib/pwd.pl index 1eb1ce7f26..68b59fcc21 100644 --- a/lib/pwd.pl +++ b/lib/pwd.pl @@ -11,10 +11,6 @@ # # Suggested alternative: Cwd -warn( "The 'pwd.pl' legacy library is deprecated and will be" - . " removed in the next major release of perl. Please use the" - . " Cwd module instead." ); - ;# $RCSfile: pwd.pl,v $$Revision: 4.1 $$Date: 92/08/07 18:24:11 $ ;# ;# $Log: pwd.pl,v $ diff --git a/lib/shellwords.pl b/lib/shellwords.pl index 1c2c894794..b24ce963ad 100644 --- a/lib/shellwords.pl +++ b/lib/shellwords.pl @@ -11,10 +11,6 @@ ;# or ;# @words = shellwords(); # defaults to $_ (and clobbers it) -warn( "The 'shellwords.pl' legacy library is deprecated and will be" - . " removed in the next major release of perl. Please use the" - . " Text::ParseWords module instead." ); - require Text::ParseWords; *shellwords = \&Text::ParseWords::old_shellwords; diff --git a/lib/stat.pl b/lib/stat.pl index a84b0accc4..4174d6007d 100644 --- a/lib/stat.pl +++ b/lib/stat.pl @@ -7,9 +7,6 @@ ;# $st_dev = @ary[$ST_DEV]; ;# -warn( "The 'stat.pl' legacy library is deprecated and will be" - . " removed in the next major release of perl." ); - $ST_DEV = 0 + $[; $ST_INO = 1 + $[; $ST_MODE = 2 + $[; diff --git a/lib/tainted.pl b/lib/tainted.pl index 388adf4bed..a3a560ffec 100644 --- a/lib/tainted.pl +++ b/lib/tainted.pl @@ -2,9 +2,6 @@ # release of perl. # This subroutine returns true if its argument is tainted, false otherwise. # -warn( "The 'tainted.pl' legacy library is deprecated and will be" - . " removed in the next major release of perl. Please use the" - . " Scalar::Util module ('tainted' function) instead." ); sub tainted { local($@); diff --git a/lib/termcap.pl b/lib/termcap.pl index 8c7381be5f..247a1718da 100644 --- a/lib/termcap.pl +++ b/lib/termcap.pl @@ -11,10 +11,6 @@ # Suggested alternative: Term::Cap # -warn( "The 'termcap.pl' legacy library is deprecated and will be" - . " removed in the next major release of perl. Please use the" - . " Term::Cap module instead." ); - ;# ;# Usage: ;# require 'ioctl.pl'; diff --git a/lib/timelocal.pl b/lib/timelocal.pl index 34d14a7b9f..5e08dad9e3 100644 --- a/lib/timelocal.pl +++ b/lib/timelocal.pl @@ -19,6 +19,3 @@ use Time::Local; *timelocal::cheat = \&Time::Local::cheat; -warn( "The 'timelocal.pl' legacy library is deprecated and will be" - . " removed in the next major release of perl. Please use the" - . " Time::Local module instead." ); |