summaryrefslogtreecommitdiff
path: root/lib/hostname.pl
diff options
context:
space:
mode:
authorSteffen Mueller <smueller@cpan.org>2009-09-02 20:14:40 +0200
committerSteffen Mueller <smueller@cpan.org>2009-09-02 20:14:40 +0200
commitd9591f87ff50af3a58bed017b7ac5c2a5c448219 (patch)
tree9987df29ea75b0356d207ae4833c6c85b00cb3f9 /lib/hostname.pl
parent2205927600c994e44473e01566456d5f896fdb5e (diff)
downloadperl-d9591f87ff50af3a58bed017b7ac5c2a5c448219.tar.gz
Deprecate hostname.pl with a warning
Diffstat (limited to 'lib/hostname.pl')
-rw-r--r--lib/hostname.pl8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/hostname.pl b/lib/hostname.pl
index 63eea8fee4..cc37d49a33 100644
--- a/lib/hostname.pl
+++ b/lib/hostname.pl
@@ -2,12 +2,18 @@
#
# 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.
#
# In particular, this should not be used as an example of modern Perl
# programming techniques.
#
# 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,$_);