Skip Menu |

This queue is for tickets about the CPAN-Releases-Latest CPAN distribution.

Report information
The Basics
Id: 95196
Status: resolved
Priority: 0/
Queue: CPAN-Releases-Latest

People
Owner: NEILB [...] cpan.org
Requestors: BARBIE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.05
Fixed in: 0.06



Subject: Plugins for other release data sources
Hi Neil, I'd like to suggest you make this distribution more generic. The method '_get_release_info_from_metacpan()' could be extracted to a plugin (CPAN::Releases::Latest::MetaCPAN), and renamed to something like 'get_release_info()'. This would then enable other plugins to be written to extract the same or similar information from other sources. For example, I was planning on writing something similar from CPAN Testers, but there have been other sources in the past, and I expect there will be others in the future. It may also be useful to include a filter, that can use a list similar to the distroprefs and ignore certain releases. I originally wrote something similar for CPAN::YACSmoke (see my BACKPAN list [1]) to use my Outlook inbox, the original NNTP feed and various Weblists. I can see this being very useful as a more generic retrieval system for CPAN Testers. [1] http://backpan.cpantesters.org/authors/id/B/BA/BARBIE/ Cheers, Barbie.
Show quoted text
> I'd like to suggest you make this distribution more generic.
Interesting thought! Show quoted text
> The method '_get_release_info_from_metacpan()' could be extracted to a > plugin (CPAN::Releases::Latest::MetaCPAN), and renamed to something > like 'get_release_info()'.
Off the cuff I'm thinking CPAN::Releases::Latest::Source::MetaCPAN, and when you create the latest: $latest = CPAN::Releases::Latest->new(source => 'Frobozz'); It would then look for CPAN::Releases::Latest::Source::Frobozz Since all such modules would not be generic, but essentially plugins for this. I'll mull some more, but maybe this is today's release :-) Cheers, Neil
You might want to take a look at the approach taken in CPAN::Common::Index, which provides a common API over top of several backend implementations.
Show quoted text
> You might want to take a look at the approach taken in > CPAN::Common::Index, which provides a common API over top of several > backend implementations.
On a quick skim of that code, it wasn't obvious to me, so I'll probably try something simpler. Cheers, Neil
0.06 now has this plugin idea, and the dist comes with the default plugin to generate the index with MetaCPAN. Cheers, Neil