xref: /onnv-gate/usr/src/cmd/perl/5.8.4/distrib/ext/IO/IO.pm (revision 0:68f95e015346)
1*0Sstevel@tonic-gate#
2*0Sstevel@tonic-gate
3*0Sstevel@tonic-gatepackage IO;
4*0Sstevel@tonic-gate
5*0Sstevel@tonic-gateuse XSLoader ();
6*0Sstevel@tonic-gateuse Carp;
7*0Sstevel@tonic-gateuse strict;
8*0Sstevel@tonic-gateuse warnings;
9*0Sstevel@tonic-gate
10*0Sstevel@tonic-gateour $VERSION = "1.21";
11*0Sstevel@tonic-gateXSLoader::load 'IO', $VERSION;
12*0Sstevel@tonic-gate
13*0Sstevel@tonic-gatesub import {
14*0Sstevel@tonic-gate    shift;
15*0Sstevel@tonic-gate
16*0Sstevel@tonic-gate    warnings::warnif('deprecated', qq{Parameterless "use IO" deprecated})
17*0Sstevel@tonic-gate        if @_ == 0 ;
18*0Sstevel@tonic-gate
19*0Sstevel@tonic-gate    my @l = @_ ? @_ : qw(Handle Seekable File Pipe Socket Dir);
20*0Sstevel@tonic-gate
21*0Sstevel@tonic-gate    eval join("", map { "require IO::" . (/(\w+)/)[0] . ";\n" } @l)
22*0Sstevel@tonic-gate	or croak $@;
23*0Sstevel@tonic-gate}
24*0Sstevel@tonic-gate
25*0Sstevel@tonic-gate1;
26*0Sstevel@tonic-gate
27*0Sstevel@tonic-gate__END__
28*0Sstevel@tonic-gate
29*0Sstevel@tonic-gate=head1 NAME
30*0Sstevel@tonic-gate
31*0Sstevel@tonic-gateIO - load various IO modules
32*0Sstevel@tonic-gate
33*0Sstevel@tonic-gate=head1 SYNOPSIS
34*0Sstevel@tonic-gate
35*0Sstevel@tonic-gate    use IO qw(Handle File);  # loads IO modules, here IO::Handle, IO::File
36*0Sstevel@tonic-gate    use IO;                  # DEPRECATED
37*0Sstevel@tonic-gate
38*0Sstevel@tonic-gate=head1 DESCRIPTION
39*0Sstevel@tonic-gate
40*0Sstevel@tonic-gateC<IO> provides a simple mechanism to load several of the IO modules
41*0Sstevel@tonic-gatein one go.  The IO modules belonging to the core are:
42*0Sstevel@tonic-gate
43*0Sstevel@tonic-gate      IO::Handle
44*0Sstevel@tonic-gate      IO::Seekable
45*0Sstevel@tonic-gate      IO::File
46*0Sstevel@tonic-gate      IO::Pipe
47*0Sstevel@tonic-gate      IO::Socket
48*0Sstevel@tonic-gate      IO::Dir
49*0Sstevel@tonic-gate      IO::Select
50*0Sstevel@tonic-gate      IO::Poll
51*0Sstevel@tonic-gate
52*0Sstevel@tonic-gateSome other IO modules don't belong to the perl core but can be loaded
53*0Sstevel@tonic-gateas well if they have been installed from CPAN.  You can discover which
54*0Sstevel@tonic-gateones exist by searching for "^IO::" on http://search.cpan.org.
55*0Sstevel@tonic-gate
56*0Sstevel@tonic-gateFor more information on any of these modules, please see its respective
57*0Sstevel@tonic-gatedocumentation.
58*0Sstevel@tonic-gate
59*0Sstevel@tonic-gate=head1 DEPRECATED
60*0Sstevel@tonic-gate
61*0Sstevel@tonic-gate    use IO;                # loads all the modules listed below
62*0Sstevel@tonic-gate
63*0Sstevel@tonic-gateThe loaded modules are IO::Handle, IO::Seekable, IO::File, IO::Pipe,
64*0Sstevel@tonic-gateIO::Socket, IO::Dir.  You should instead explicitly import the IO
65*0Sstevel@tonic-gatemodules you want.
66*0Sstevel@tonic-gate
67*0Sstevel@tonic-gate=cut
68*0Sstevel@tonic-gate
69