Repository link now appearing on CPAN
May 1, 2009
Had me looking twice because seeing repository link on module pages on CPAN was new to me…..
Yes it is new and I wasn’t the first to spot it: hanekomu’s Perl blog: Metadata on search.cpan.org
Hanekomu shows how to implement it in Module::Install. And Alexandr Ciornii comment points to how it can be done in Module::Build.
This is what you need to do in Module::Build (see meta_merge part):
use strict; use warnings; use Module::Build; my $builder = Module::Build->new( module_name => 'Builder', license => 'perl', dist_author => 'Barry Walsh <[email protected]>', dist_version_from => 'lib/Builder.pm', build_requires => { 'Test::More' => 0, 'Carp' => 0, }, add_to_cleanup => [ 'Builder-*' ], create_makefile_pl => 'traditional', meta_merge => { resources => { bugtracker => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=Builder', repository => 'http://github.com/draegtun/builder/tree/master' } }, ); $builder->create_build_script();
Running “./Build distmeta” produces the correct META.yml
/I3az/
6 Comments
leave one →
Nice! The apparition of that line hadn’t registered in my brain till you pointed it out. 🙂
Many moons ago I wrote a greasemonkey script to extract the information from the META.yml (http://userscripts.org/scripts/show/31748). I’ll have to modify it to play nicely with the new upgrade.
Hi Yanick,
Yes its nice to see a repository link given more prominence on CPAN especially in this GitHub frenzy world we currently live in 😉
Barry
PS. For some reason your comment got caught in the WordPress spam filter and so I’ve only just noticed it (took me a while to wade thru the spam!).
[re: caught in spam limbo] Hmm… I wonder what tripped WordPress’ alarms. Could be my userscript link, or my dyndns.org address (in theory, I don’t need dynamic assignment anymore, as my server has a static IP addie nowadays — but I’ve used babyl.dyndns.org for so long that changing would be a real pain).
Oh well… My comment managed to emerge anyway, and I guess that’s what matters. 🙂
Had just over 100 spam comments to go thru and yours was the only one I spotted as not being spam!
And for anyone that I didn’t spot in the jetsam & flotsam…. opps Sorry! I’ll do my spam pruning a bit more frequently from now on 😉