Hi! Please consider following me on twitter: @hanekomu.

Metadata on search.cpan.org

search.cpan.org now also shows certain kinds of metadata if they are listed in the distribution's META.yml file. For example, see the "Repository" link on the URI::Find page.

If you are using a recent version of Module::Install, you can tell it about these kinds of metadata. For example, here is the relevant part of the Makefile.PL from my Text-Pipe distribution:

use inc::Module::Install;

name 'Text-Pipe';
all_from 'lib/Text/Pipe.pm';
perl_version '5.006';

homepage 'http://search.cpan.org/dist/Text-Pipe/';
bugtracker 'http://rt.cpan.org/Public/Dist/Display.html?Name=Text-Pipe';
repository 'http://github.com/hanekomu/text-pipe/tree/master';

# requires ...
# extra_tests;

WriteAll;

(I haven't released this version to CPAN yet.)

When running perl Makefile.PL, the generated META.yml file will contain this section:

resources:
  bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=Text-Pipe
  homepage: http://search.cpan.org/dist/Text-Pipe/
  license: http://dev.perl.org/licenses/
  repository: http://github.com/hanekomu/text-pipe/tree/master

Write a comment | Bookmark and Share

posted at: 21:29 | path: /dev | permalink | 2 comments | 0 trackbacks

Alexandr Ciornii wrote at 2009-03-20 00:44:

I added 'keywords' command for Module::Install recently (not released yet). It allows adding keywords into META.yml. You can do this with meta_merge in Module::Build and ExtUtils::MakeMaker.

Example of EUMM's new features for META.yml (sorry for formatting):

($ExtUtils::MakeMaker::VERSION ge '6.48'?

('LICENSE' => 'perl',

'MIN_PERL_VERSION' => 5.006,

META_MERGE => {

resources=> {

repository => 'http://URL',

},

keywords => ['keyword1','keyword2'],

},

) : ()),

I plan to add CONFIGURE_REQUIRES and BUILD_REQUIRES to EUMM soon (need to rewrite old patch).

Alexandr Ciornii wrote at 2009-03-20 11:18:

Also see Module::Install::Repository (Automatically sets repository URL from svn/svk/Git checkout)

Comments are closed for this story.

Trackbacks are closed for this story.