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