C<Wx::Perl::FSHandler::LWP> - file system handler based upon LWP


NAME

Wx::Perl::FSHandler::LWP - file system handler based upon LWP


SYNOPSIS

  my $ua = LWP::UserAgent->new;
  # customize the User Agent, set proxy, supported protocols, ...
  my $handler = Wx::Perl::FSHandler::LWP->new( $ua );
  Wx::FileSystem::AddHandler( $handler );


DESCRIPTION

The Wx::Perl::FSHandler::LWP is a wxFileSystemHandler implementation based upon LWP::UserAgent, and is meant as a superior replacement for wxInternetFSHandler.

new

  my $handler = Wx::Perl::FSHandler::LWP->new( $ua );

Creates a new instance. $ua must be an object of class LWP::UserAgent, which will be used to handle requests.

CanOpen

Called internally by Wx::FileSystem. Calls is_protocol_supported on the user agent to determine if the location can be opened.

OpenFile

Called internally by Wx::FileSystem. Uses the user agent to fetch the URL and returns a Wx::FSFile representing the result.

user_agent

  my $ua = $handler->user_agent;

Returns the LWP::UserAgent object used to handle requests.


ENVIRONMENTAL VARIABLES

See LWP::UserAgent.


AUTHOR

Mattia Barbon <mbarbon@cpan.org>


LICENSE

Copyright (c) 2003, 2006 Mattia Barbon.

This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


SEE ALSO

LWP::UserAgent

wxFileSystem and wxFileSystemHandler in wxPerl documentation.

 C<Wx::Perl::FSHandler::LWP> - file system handler based upon LWP