NAME

LWP::Protocol::virtual - Protocol to locate resources on groups of sites

VERSION

Version 0.02

SYNOPSIS

 #
## From shell, not perl.
cpan URI::virtual
echo 'CPAN http://cpan.mirror.com/pub/CPAN' > ~/.lwp_virt
GET virtual://CPAN/some/path/some-path-1.0.tgz > some-path-1.0.tgz
perl -MCPAN -e '
	my $CPAN = CPAN->new();
	CPAN::Config->load($CPAN);
	$CPAN::Config->{urllist} = [ qw(virtual://CPAN/) ];
	CPAN::Config->commit("MyConfig.pm");
'
## Move MyConfig to somewhere CPAN will find it.

FUNCTIONS

request

This processes a request, by calling $uri->resolve on the URI object (which one would suspect is an instalnce of URI::virtual, and therefore supports it) and returning a redirect to the uri returned. Any URI subclass which satisfies the conditions:

$uri->can("resolve")->()->isa("URI")
ref $uri->can("path") eq 'CODE'

will be acceptable. How you would tell LWP to use this Protocol for another scheme is anybody's guess.

see URI::virtual.

AUTHOR

Rich Paul, <cpan@rich-paul.net> Mail to this address bounces, but you'll think of something. It's a poor man's Turing Test.

BUGS

Please report any bugs or feature requests to bug-lwp-protocol-virtual@rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=LWP-Protocol-virtual. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

ACKNOWLEDGEMENTS

The guys who wrote LWP. Nice job!

COPYRIGHT & LICENSE

Copyright 2005 Rich Paul, All Rights Reserved.

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