From: Steffen Mueller Date: Mon, 5 Apr 2010 13:15:38 +0000 (+0200) Subject: Remove perl4-library deprecation warnings X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=870abcc9ec31b0ec6d369f95516616d679e92b99;p=p5sagit%2Fp5-mst-13.2.git 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 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. --- diff --git a/lib/abbrev.pl b/lib/abbrev.pl index eac0053..cd20063 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 768ae49..2c2073c 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 9f94e84..dd0bc05 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 a31bfec..d28f0e2 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 f5378b8..f3b5995 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 789c910..368e98e 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 79a184a..2fb3b33 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 6f4016a..1b91ec2 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 0819e18..2ae88ba 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 8c77a07..09a4d3e 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 1113348..34b60f7 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 e8e4eb7..f79decf 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 6a177c6..331247a 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 577f7c7..e621ff0 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 571b319..fcca2ce 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 be393c4..343921f 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 ec1012a..b2aa5cb 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 cc37d49..33907c6 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 75274c2..865a226 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 fec31fe..f2a4e09 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 e21d396..d6d8b0b 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 5c24a3c..96d80d7 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 ab7fa5f..9a387eb 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 1eb1ce7..68b59fc 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 1c2c894..b24ce96 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 a84b0ac..4174d60 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 388adf4..a3a560f 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 8c7381b..247a171 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 34d14a7..5e08dad 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." );