Tie::Handle::HTTP - Tie class for doing HTTP range requests for read calls.


Tie-Handle-HTTP documentation  | view source Contained in the Tie-Handle-HTTP distribution.

Index


NAME

Top

Tie::Handle::HTTP - Tie class for doing HTTP range requests for read calls.

SYNOPSIS

Top

  use Tie::Handle::HTTP;

  tie *HANDLE, "http://example.com/largefile";
  # or
  my $fh = Tie::Handle::HTTP->new( "http://example.com/largefile" );

  # Seek to 1 MB in the file
  seek HANDLE, 1024 * 1024, 0;

  # Read 1 KB from the middle
  read HANDLE, my $buf, 1024;

DESCRIPTION

Top

This module sets up a tied filehandle and associates it with a single HTTP address where each read on the filehandle will be performed as an HTTP Range request. Keepalives are used when possible, but requests will not be buffered in any way.

METHODS

Top

Tie::Handle::HTTP->new( URI )

Takes a single argument, a URI string to open. Returns a globref for a tied filehandle in this class.

EXAMPLES

Top

Example code can be found in the 'examples' directory found in the tarball for this module. Fresh copies can be downloaded from CPAN if you are unable to find the examples in a vendor distribution.

BUGS and LIMITATIONS

Top

No buffering of any kind, may be added in future versions based on demand.

Scalar filehandle manipulation is not supported at this time, I'm not quite sure how to make it work.

AUTHOR

Top

Jonathan Steinert, <hachi@cpan.org>

COPYRIGHT AND LICENSE

Top


Tie-Handle-HTTP documentation  | view source Contained in the Tie-Handle-HTTP distribution.