On Thu, Oct 27, 2011 at 11:26 AM, Christian Sturm <ree...@reezer.org> wrote:
> Hello!
>
> I am not sure whether this is the right group, so I am
> really sorry in case it isn't. Also my English isn't very good,
> so I hope you forgive me any mistakes.

It's not really the right group, though I'm not sure what group is
right for a discussion of a specification of this type.  Possibly
cpan-work...@perl.org as that has most of the CPAN/PAUSE/toolchain
people on it.

> With perlbrew and cpanm wouldn't it make sense to create an URI
> like:
>
> cpan:Foo::Module

See https://metacpan.org/module/URI::cpan

It's not sufficient to just have "cpan:Foo::Module" because that is
only one of the types of things on CPAN.  What CPAN really has is
tarball files ("cpan:///distfile:..." in URI::cpan) organized by
author directory ("cpan:///author:...").  It's also important to have
the server portion of the URI, even if blank for a default choice, as
it allows specifying a particular mirror, since CPAN is decentralized.
 E.g. "cpan://cpan.cpantesters.org/distfile/...".

Beyond that, URI::cpan conceives of (but does not implement)
additional subtypes for modules (a namespace corresponding to a .pm
file) and packages (a namespace which may or may not also be a .pm
file).  The last one would be references into the 02packages index of
packages to tarballs.  As far as I know, nothing identifies modules
distinct from packages.  (N.B. metacpan uses incorrect terminology in
its URL's -- they should have used "package" instead of "module")

URI::cpan also conceives of the "dist" subtype, which is often
implemented by web sites as the tarball name without the version to
mean the "latest" distribution.  This is tricky to usefully get right
because the only thing unique on CPAN is AUTHOR/TARBALL -- just a
"dist" name without author prefix and version/archive suffix is not
guaranteed unique.  It really needs to be more like distfile:
cpan:///dist/DAGOLDEN/File-Marker to have any hope of being
universally useful without lots of heuristics.

-- David

Reply via email to