summaryrefslogtreecommitdiff
path: root/ext/IO/IO.pm
diff options
context:
space:
mode:
authorHugo van der Sanden <hv@crypt.org>2002-10-24 23:54:50 +0000
committerhv <hv@crypt.org>2002-10-24 23:54:50 +0000
commit5c04bfc992a3719eced617efd59cb8f236465d3e (patch)
treeca30843d0df883231e4737a46978ea27139c7344 /ext/IO/IO.pm
parent53782852c4180f19fdba07aae83d56ebeb358e94 (diff)
downloadperl-5c04bfc992a3719eced617efd59cb8f236465d3e.tar.gz
2 lines of change #18039 had several problems
p4raw-link: @18039 on //depot/perl: 40a3dda160f7716cf8fb3c9068ec08ae7f6c681e p4raw-id: //depot/perl@18060
Diffstat (limited to 'ext/IO/IO.pm')
-rw-r--r--ext/IO/IO.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/IO/IO.pm b/ext/IO/IO.pm
index eb78c8a763..6a4a7ff667 100644
--- a/ext/IO/IO.pm
+++ b/ext/IO/IO.pm
@@ -10,8 +10,11 @@ XSLoader::load 'IO', $VERSION;
sub import {
shift;
- warnings::warn('all', qq|parameterless "use IO" deprecated|)
- if defined &warnings::warn && warnings::enabled('all');
+ if (@_ == 0) {
+ require warnings;
+ warnings::warn('deprecated', qq{parameterless "use IO" deprecated})
+ if warnings::enabled('deprecated');
+ }
my @l = @_ ? @_ : qw(Handle Seekable File Pipe Socket Dir);
eval join("", map { "require IO::" . (/(\w+)/)[0] . ";\n" } @l)