Rich Paul > LWP-Protocol-virtual-0.02 > URI::virtual

Download:
LWP-Protocol-virtual-0.02.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  2
Open  0
View/Report Bugs
Module Version: 0.02   Source  

NAME ^

URI::virtual - virtual URI, refers to a list of prefixes.

VERSION ^

Version 0.02

package URI::virtual;

REQUIRES ^

URI::http, Carp

SYNOPSIS ^

 #
use lib "$ENV{PWD}/lib";
use URI;
use Data::Dumper;
my @uris = (
        URI->new("virtual://CPAN/authors/"),
        map { URI->new("virtual://CPAN/modules/")->resolve() } 1 .. 5,
);
for ( @uris ) {
        print ref, " => ", $_, "\n";
};
__DATA__
#my config
CPAN    ftp://mirror.hiwaay.net/CPAN/ 
CPAN    ftp://csociety-ftp.ecn.purdue.edu/pub/CPAN
CPAN    ftp://cpan.mirrors.redwire.net/pub/CPAN/
#include /usr/portage/profiles/thirdpartymirrors
#my results
URI::virtual => virtual://CPAN/authors/
URI::ftp => ftp://cpan.mirrors.redwire.net/pub/CPAN///modules/
URI::ftp => ftp://cpan.mirrors.redwire.net/pub/CPAN///modules/
URI::ftp => ftp://csociety-ftp.ecn.purdue.edu/pub/CPAN//modules/
URI::ftp => ftp://csociety-ftp.ecn.purdue.edu/pub/CPAN//modules/
URI::ftp => ftp://cpan.mirrors.redwire.net/pub/CPAN///modules/

load_lists accepts a list of filenames, and adds their contents to the lookup table.

syntax highlighting: