typo in Socket.pm
[p5sagit/p5-mst-13.2.git] / ext / IO / IO.pm
index cb6d5d8..0087530 100644 (file)
@@ -2,14 +2,24 @@
 
 package IO;
 
-use IO::Handle;
-use IO::Seekable;
-use IO::File;
-use IO::Pipe;
-use IO::Socket;
+use XSLoader ();
+use Carp;
+
+$VERSION = "1.20";
+XSLoader::load 'IO', $VERSION;
+
+sub import {
+    shift;
+    my @l = @_ ? @_ : qw(Handle Seekable File Pipe Socket Dir);
+
+    eval join("", map { "require IO::" . (/(\w+)/)[0] . ";\n" } @l)
+       or croak $@;
+}
 
 1;
 
+__END__
+
 =head1 NAME
 
 IO - load various IO modules
@@ -20,16 +30,18 @@ IO - load various IO modules
 
 =head1 DESCRIPTION
 
-C<IO> provides a simple mechanism to load all of the IO modules at one go.
+C<IO> provides a simple mechanism to load some of the IO modules at one go.
 Currently this includes:
 
-       IO::Handle
-       IO::Seekable
-       IO::File
-       IO::Pipe
-       IO::Socket
+      IO::Handle
+      IO::Seekable
+      IO::File
+      IO::Pipe
+      IO::Socket
+      IO::Dir
 
 For more information on any of these modules, please see its respective
 documentation.
 
 =cut
+