2 lines of change #18039 had several problems
[p5sagit/p5-mst-13.2.git] / ext / IO / IO.pm
1 #
2
3 package IO;
4
5 use XSLoader ();
6 use Carp;
7
8 $VERSION = "1.20";
9 XSLoader::load 'IO', $VERSION;
10
11 sub import {
12     shift;
13     if (@_ == 0) {
14         require warnings;
15         warnings::warn('deprecated', qq{parameterless "use IO" deprecated})
16                 if warnings::enabled('deprecated');
17     }
18     my @l = @_ ? @_ : qw(Handle Seekable File Pipe Socket Dir);
19
20     eval join("", map { "require IO::" . (/(\w+)/)[0] . ";\n" } @l)
21         or croak $@;
22 }
23
24 1;
25
26 __END__
27
28 =head1 NAME
29
30 IO - load various IO modules
31
32 =head1 SYNOPSIS
33
34     use IO qw(Handle File);  # loads IO modules, here IO::Handle, IO::File
35     use IO;                  # DEPRECATED
36
37 =head1 DESCRIPTION
38
39 C<IO> provides a simple mechanism to load several of the IO modules
40 in one go.  The IO modules belonging to the core are:
41
42       IO::Handle
43       IO::Seekable
44       IO::File
45       IO::Pipe
46       IO::Socket
47       IO::Dir
48       IO::Select
49       IO::Poll
50
51 Some other IO modules don't belong to the perl core but can be loaded
52 as well if they have been installed from CPAN.  You can discover which
53 ones exist by searching for "^IO::" on http://search.cpan.org.
54
55 For more information on any of these modules, please see its respective
56 documentation.
57
58 =head1 DEPRECATED
59
60     use IO;                # loads all the modules listed below
61
62 The loaded modules are IO::Handle, IO::Seekable, IO::File, IO::Pipe,
63 IO::Socket, IO::Dir.  You should instead explicitly import the IO
64 modules you want.
65
66 =cut
67