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