Front page | perl.qa |
Postings from December 2011
Re: Need suggestions for terminology
From: Michael G Schwern
December 2, 2011 19:10
Re: Need suggestions for terminology
Message ID: 4ED99334.email@example.com
You might want to crib from BackPAN::Index. It has a lot of this terminology.
On 2011.12.2 5:21 PM, Jeffrey Thalhammer wrote:
> The context is Pinto, which is yet-another suite of libraries and tools
> for building a private CPAN-like repository.
Does it explode when hit from the rear? No? Joke too old?
> Distribution: A Distribution is an abstract concept that defines
> relationships between packages. The minimal concrete implementation
> of a Distribution would be just a META.json (or equivalent) file.
> Distributions also have names and versions like Foo-Bar-1.2
This is what I term a "release".
A "distribution" is the whole Foo-Bar series of releases. It has a name, a
list of releases, and not much else. All the real data is associated with a
distribution's releases. See BackPAN::Index::Dist.
A "release" is a specific version of a distribution. It has a CPAN id, date
of release, what distribution it's for, a filename, version, what files are in
it, etc... basically everything that's in the meta file is associated with a
release. See BackPAN::Index::Release.
> Distribution Archive: A Distribution Archive is the physical
> manifestation of a Distribution, and corresponds to an actual file on the
> local disk. For example, /home/jeff/Foo-Bar-1.2.tar.gz or
"Release archive" I guess.
> Distribution Path: The Distribution Path is how an Archive is identified
> in a CPAN index. It is basically a URL fragment that looks like
> A/AU/AUTHOR/Foo-Bar-1.2.tar.gz. This is the term I'm having the most
> trouble with. CPAN::DistnameInfo calls this the "prefix" but I don't
> really like that either.
"Release path". I agree that "prefix" is a poor name.
I would store it as just AUTHOR/Foo-Bar-1.2.tar.gz. The A/AU/ is an
implementation contrivance and can be calculated.
There is value in having just the filename available separate from the rest of
the path as well.
> Package: A package is just a package, in the usual way. That is,
> something declared with the "package" keyword.
> Module: I actually avoid using the term Module because I think it is
> often misused. I feel that a Module is a physical file (i.e. something
> that you "use"). But some folks use the terms Module and Package
> interchangeably. To be precise, CPAN (and Pinto) index Packages not
> Modules. So when you ask cpan to install Foo::Bar, what you actually
> install is an Archive that contains some Module that provides Package
> Foo::Bar, and that Module may or may not be called Foo/Bar.pm.
> At least, that's how I understand it.
Agreed that "module" is overloaded. I would associated it either with
the .pm file or with the distribution. Probably best to avoid it all together.
> Repository: A repository is a general term for any CPAN-like pile of
> files. This includes CPAN mirrors, as well as any DarkPAN or mini-cpans.
> A repository has a URL that identifies the entry point. For example:
You might want to record the type of repository, even if there's
only "CPAN" for now. It might be worth differentiating "CPAN" from "BackPAN".
The structure is the same, but one has some CPAN releases and the later as
has all CPAN releases.
For example, if you wanted to pull from Debian or Fedora sources.
> CPAN: *THE* CPAN is http://cpan.perl.org (or wherever PAUSE publishes
> stuff). *A* CPAN is one of the mirrors that replicate *THE* CPAN.
> A DarkPAN or mini-cpan or Pinto are *not* CPANs.
I'd call it something else, as this can rapidly get confusing. I'm not sure what.
44. I am not the atheist chaplain.
-- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army