Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Listing scripts in distribution metadata

by perlancar (Hermit)
on Oct 27, 2020 at 22:43 UTC ( [id://11123239]=perlquestion: print w/replies, xml ) Need Help??

perlancar has asked for the wisdom of the Perl Monks concerning the following question:

I wonder why the CPAN distribution metadata does not define a more general 'provides' to let a distribution specifies the list of scripts or other documents that it contains, in addition to packages. It would make things easier for tools like MetaCPAN, or App::lcpan. Right now I believe (not confirmed yet by reading the source code) that MetaCPAN performs some static parsing of Makefile.PL to get EXE_FILES, but less-than-straightforward declaration of EXE_FILES will make it miss (example: Spreadsheet-Read's Makefile.PL).
  • Comment on Listing scripts in distribution metadata

Replies are listed 'Best First'.
Re: Listing scripts in distribution metadata
by tobyink (Canon) on Oct 27, 2020 at 23:56 UTC

    I've been using an x_provides_scripts hash in META.json, modelled after the standard provides hash. So say your distribution provides a "csv2json" script, your META.json would contain:

    "x_provides_scripts": { "csv2json": { "version": "0.1", "file": "bin/csv2json" } }
      Perfect. I'll be adding a support for x_provides_scripts in App::lcpan. I've also started to document the list of custom keys like this in CPAN::Meta::X.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11123239]
Approved by choroba
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2024-04-24 22:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found