summaryrefslogtreecommitdiff
path: root/ext/IO/IO.pm
diff options
context:
space:
mode:
Diffstat (limited to 'ext/IO/IO.pm')
-rw-r--r--ext/IO/IO.pm13
1 files changed, 7 insertions, 6 deletions
diff --git a/ext/IO/IO.pm b/ext/IO/IO.pm
index 6a4a7ff667..287671e797 100644
--- a/ext/IO/IO.pm
+++ b/ext/IO/IO.pm
@@ -4,17 +4,18 @@ package IO;
use XSLoader ();
use Carp;
+use strict;
+use warnings;
-$VERSION = "1.20";
+our $VERSION = "1.20";
XSLoader::load 'IO', $VERSION;
sub import {
shift;
- if (@_ == 0) {
- require warnings;
- warnings::warn('deprecated', qq{parameterless "use IO" deprecated})
- if warnings::enabled('deprecated');
- }
+
+ warnings::warnif('deprecated', qq{parameterless "use IO" deprecated})
+ if @_ == 0 ;
+
my @l = @_ ? @_ : qw(Handle Seekable File Pipe Socket Dir);
eval join("", map { "require IO::" . (/(\w+)/)[0] . ";\n" } @l)