The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

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

VERSION

Version 0.01

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($CPAN);
        '

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.