|
NAMEIO::All::LWP - IO::All interface to LWPSYNOPSISuse IO::All; "hello world\n" > io('ftp://localhost/test/x'); # save to FTP $content < io('http://example.org'); # GET webpage io('http://example.org') > io('index.html'); # save webpage DESCRIPTIONThis module acts as glue between IO::All and LWP, so that files can be read and written through the network using the convenient <IO:All> interface. Note that this module is not "use"d directly: you just use IO::All, which knows when to autoload IO::All::HTTP, IO::All::HTTPS, IO::All::FTP, or IO::All::Gopher, which implement the specific protocols based on IO::All::LWP.EXECUTION MODELGET requests. When the IO::All object is opened, the URI is fetched and stored by the object in an internal file handle. It can then be accessed like any other file via the IO::All methods and operators, it can be tied, etc.PUT requests. When the IO::All object is opened, an internal file handle is created. It is possible to that file handle using the various IO::All methods and operators, it can be tied, etc. If $io->put is not called explicitly, when the IO::All object is closed, either explicitly via $io->close or automatically upon destruction, the actual PUT request is made. The bad news is that the whole file is stored in memory after getting it or before putting it. This may cause problems if you are dealing with multi-gigabyte files! METHODSThe simplest way of doing things is via the overloaded operators > and <, as shown in the SYNOPSIS. These take care of automatically opening and closing the files and connections as needed. However, various methods are available to provide a finer degree of control.This is a subclass of IO::All. In addition to the inherited methods, the following methods are available:
DEPENDENCIESThis module uses LWP for all the heavy lifting. It also requires perl-5.8.0 or a more recent version.SEE ALSOIO::All, LWP, IO::All::HTTP, IO::All::FTP.AUTHORSIvan Tubert-Brohman <itub@cpan.org> and Brian Ingerson <ingy@cpan.org>Thanks to Sergey Gleizer for the ua method. COPYRIGHTCopyright (c) 2007. Ivan Tubert-Brohman and Brian Ingerson. All rights reserved.This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See <http://www.perl.com/perl/misc/Artistic.html>
Visit the GSP FreeBSD Man Page Interface. |