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