Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

META.yml the difference between `name` and `requires`

by bessarabov (Acolyte)
on Oct 06, 2013 at 10:09 UTC ( #1057138=perlquestion: print w/ replies, xml ) Need Help??
bessarabov has asked for the wisdom of the Perl Monks concerning the following question:

Here the part of META.yml file https://metacpan.org/source/RIBASUSHI/DBIx-Class-0.08250/META.yml :
name: DBIx-Class requires: Class::Accessor::Grouped: 0.10010 Class::C3::Componentised: 1.0009 Class::Inspector: 1.24
I wonder why there is 2 variants of writing the release name, the one with "-" and the one with "::". From my point of view this variant would be more robust:
name: DBIx-Class requires: Class-Accessor-Grouped: 0.10010 Class-C3-Componentised: 1.0009 Class-Inspector: 1.24
How `cpan`, `cpanm` and other programms that work with deps convert "::" verion to the "-" version? For example I don't get it how to convert:
requires: LWP: 0
to the real release name witch is `libwww-perl`

Comment on META.yml the difference between `name` and `requires`
Select or Download Code
Re: META.yml the difference between `name` and `requires`
by Corion (Pope) on Oct 06, 2013 at 10:29 UTC

    I think the name is the name of the distribution, while the requires section lists modules (not distributions). This is just me guessing - CPAN::Meta::Spec likely has the gory details.

    To get from a module to its distribution is in 02packages.details.txt, but there likely are CPAN modules that handle this mapping for you. I would look at CPAN::SQLite first, but most likely many of the other modules implement (or reuse) the similar logic.

      META-spec 1.4 is more relevant. CPAN::Meta::Spec is version 2 of the specification and is typically only used in META.json files rather than META.yml. CPAN::Meta::Spec has a more powerful prerequisite specification.

      (PS: can you please fix your </i>?)

      use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1057138]
Approved by toolic
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2015-07-04 19:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls