On Wed, Mar 26, 2008 at 5:23 PM, Ricardo SIGNES <[EMAIL PROTECTED]> wrote: > 1. cpan://package/Your::Face > 2. cpan://dist/HDP/Your-Face > 3. cpan://dist/HDP/Your-Face/0.01 > 4. cpan://file/HDP/Your-Face-0.01.tar.gz > > (4) means that you can't use cpan:// to find a non-author file, like > 02packages > itself. There could be //file and //userfile. Or something.
5. cpan://index/02packages.txt.gz That could be used as a uniform way to address index files scattered across the authors/, modules/, and indices/ directories. I don't like "file" because that's not the only way to address files. I would do (4) like this: 4a. cpan://author/HDP/Your-Face-0.01.tar.gz That implies a meaning for "cpan://author/HDP" as well, which is nice. It's also worth noting that not all distributions are in the author's root directory, thus you could have: cpan://author/ILYAZ/modules/Audio-FindChunks-0.03.tar.gz > (2) would refer to the dist per se, not anything like "latest version" That's what I don't really get. What does that *mean*? If a URI is supposed to identify a resource (c.f http://en.wikipedia.org/wiki/Uniform_Resource_Identifier), what "resource" does (2) identify? I said "latest" because that attempts to pin it to a specific resource. In the abstract, it doesn't seem to have any standard meaning and thus no real utility. What's the use case? Maybe that will help us pin it down. One thing that would have clear intent is the distributions that are listed in the 02packages file. For example, I use that in CPAN::Mini::Devel to determine if some random tarball sufficiently resembles an indexed tarball to be considered a 'development release' to mirror instead of just some randomly uploaded file. > If the backpan indexing is a success, then we may end up with: > > 1. cpan://package/Your::Face > 2. cpan://package/Your::Face/0.01 Agreed. (2) here might not "resolve" (yet), but it has an unambiguous intent. *** Summary -- proposed definitions *** 1.) Packages -- refers to an Perl package; also to a particular tarball or a particular file containing that package definition. May include a version, or otherwise corresponds to the indexed version in 02packages; without a specific package, refers to all indexed packages (essentially a dump of 02packages): 1a. cpan://package/ 1b. cpan://package/Your::Face 1c. cpan://package/Your::Face/0.01 2.) Index -- refers to a CPAN index file; resource may reside in one of several directories in a CPAN repository; without a name could refer to all "index-like" files: 2a. cpan://index/ 2b. cpan://index/02packages.txt.gz 2c. cpan://index/find-ls.gz 3) Author -- refers to an author's CPAN directory or a specific path within an author's directory: 3a. cpan://author/HDP/ 3b. cpan://author/HDP/Your-Face-0.01.tar.gz 3c. cpan://author/ILYAZ/modules/Audio-FindChunks-0.03.tar.gz 4) Distribution -- refers to a distribution tarball indexed in 02packages; could include an optional version; if the data were available, it could refer to any distribution ever indexed in any 02packages file historically; Without a distribution name or author, refers to all indexed distributions or all indexed distributions by a particular author: 4a. cpan://dist/ 4b. cpan://dist/HDP/ 4c. cpan://dist/HDP/Your-Face 4d. cpan://dist/HDP/Your-Face/0.01 Note that (4) still has some big challenges -- e.g. how to deal with things like (3c), how to deal with "cpan::dist/HDP/Your-Face" when both Your-Face-0.01.tar.gz and Your-Face-0.02.tar.gz both show up in 02packages, how to parse out versions, and so on. But at least this way, I think the intent is clear and the definition could be extended to include some of the heuristics for resolving ambiguity. What do you think? David