Import of JROGERS/Net-Telnet-3.00 from CPAN.
[Net-Telnet.git] / README
blobc03a55795ee51f7def5a90fd75b1ca8cb76f7ec9
2                       Net::Telnet, version 3.00
4     Copyright (c) 1997 Jay Rogers. All rights reserved.  This program
5     is free software; you can redistribute it and/or modify it under
6     the same terms as Perl itself.
9   Prerequisite
10   ------------
12     .  Perl Version 5.002 or later
14     .  Windows 95/NT requires Perl beta version 5.003_07 or later
16     .  No modules are required that don't already come with a
17        standard distribution of Perl.
20   Description
21   -----------
23     Net::Telnet allows you to make client connections to a TCP port
24     and do network I/O, especially with a port using the TELNET
25     protocol.  Simple I/O methods such as print, get, and getline are
26     provided.  More sophisticated interactive features are provided
27     because connecting to a TELNET port ultimately means communicating
28     with a program designed for human interaction.  Some interactive
29     features include the ability to specify a timeout and to wait for
30     patterns to appear in the input stream, such as the prompt from a
31     command interpreter.
33     This example prints who's logged-on to the remote host sparky:
35         $sparky = new Net::Telnet (Host => "sparky",
36                                    Timeout => 10,
37                                    Prompt => '/[$%#>] $/');
38         $sparky->login($username, $passwd);
39         @lines = $sparky->cmd("/usr/bin/who");
40         print @lines;
41         $sparky->close;
43     Other reasons to use this class than strictly with a TELNET port
44     are:
46         .  You're not familiar with sockets and you want a simple
47            way to make client connections to TCP services.
49         .  You want to be able to specify your own time-out while
50            connecting, reading, or writing.
52         .  You're communicating with an interactive program at the
53            other end of some socket or pipe and you want to wait for
54            certain patterns to appear.
56     Examples are contained in the POD user documentation.
58     This is an alpha version - meaning that the interface may change
59     in future versions.  Contact me, Jay Rogers <jay@rgrs.com>, if you
60     find any bugs or have suggestions for improvement.
63   Documentation
64   -------------
66     User documentation in POD format is contained in the module.
67     Installing using "make" places a man page in the perl library
68     under directory "man/man3".
71   Installation
72   ------------
74     .  To install, cd to the directory containing the unpacked
75        distribution and do one of the following:
77         a.  Create a makefile by running Makefile.PL using the perl
78             whose library you want to install into and then running
79             make:
81                 perl Makefile.PL
82                 make test
83                 make install
85         b.  To install into an alternate library, set the "prefix"
86             argument where you want to install.  You can ignore any
87             errors mentioning perllocal.pod.  For example:
89                 perl Makefile.PL prefix=~/local
90                 make test
91                 make install
93         c.  Alternatively, you can just copy or move Telnet.pm
94             from the distribution into a directory named Net in the
95             Perl library.
99 Jay Rogers
100 jay@rgrs.com
101 March 17, 1997