On Wednesday 26 March 2008, Hans Dieter Pearcey wrote:
> rjbs and I have been working on something that involves referring to things
> on CPAN, both real files and abtract things (modules, dists without
> versions, etc.). Here's what we have working so far:
>
> URI::cpan (isa URI::_generic) reblesses into several packages based on its
> 'authority'.
>
> cpan://package/ -> URI::cpan::package
>
> cpan://package/Foo::Bar
> cpan://package/Foo::Bar/1.23
>
> cpan://dist/ -> URI::cpan::dist
>
> cpan://dist/Foo-Bar
> cpan://dist/Foo-Bar/1.23
>
> both package and dist urls have accessor/mutators for 'name' and 'version':
>
> my $url = URI->new('cpan://package/Foo::Bar');
> print $url->name; # Foo::Bar
> print $url->version; # undef
> $url->version("1.23"); # this works
> print $url; # cpan://package/Foo::Bar/1.23
>
> cpan://^[A-Z]+$/ -> URI::cpan::author
>
> cpan://HDP/Foo-Bar-1.23.tar.gz
> cpan://HDP/some/subdir/random/file.txt
>
For consistency I'd prefer if this were cpan://author/HDP instead. This way I
can also write cpan:://author/hdp or whatever.
Regards,
Shlomi Fish
---------------------------------------------------------------------
Shlomi Fish [EMAIL PROTECTED]
Homepage: http://www.shlomifish.org/
I'm not an actor - I just play one on T.V.