|
NAMEAcme::MetaSyntactic::RemoteList - Retrieval of a remote source for a themeSYNOPSISpackage Acme::MetaSyntactic::contributors; use strict; use Acme::MetaSyntactic::List; our @ISA = qw( Acme::MetaSyntactic::List ); # data regarding the remote source our %Remote = ( source => 'http://search.cpan.org/dist/Acme-MetaSyntactic/CONTRIBUTORS', extract => sub { my $content = shift; my @items = map { Acme::MetaSyntactic::RemoteList::tr_nonword($_) } map { Acme::MetaSyntactic::RemoteList::tr_accent($_) } $content =~ /^\* (.*?)\s*$/gm; return @items; }, ); __PACKAGE__->init(); 1; # and the usual documentation and list definition DESCRIPTIONThis base class adds the capability to fetch a fresh list of items from a remote source to any theme that requires it.To be able to fetch remote items, an "Acme::MetaSyntactic" theme must define the package hash variable %Remote with the appropriate keys. The keys are:
"LWP::Simple" is used to download the remote data. All existing "Acme::MetaSyntactic" behaviours ("Acme::MetaSyntactic::List" and "Acme::MetaSyntactic::Locale" are subclasses of "Acme::MetaSyntactic::RemoteList". METHODSAs an ancestor, this class adds the following methods to an "Acme::MetaSyntactic" theme:
TRANSFORMATION SUBROUTINESThe "Acme::MetaSyntactic::RemoteList" class also provides a few helper subroutines that simplify the normalisation of items:
AUTHORPhilippe 'BooK' Bruhat, "<book@cpan.org>".ACKNOWLEDGEMENTSThanks to Michael Scherer for his help in finding the name of this module on "#perlfr". Welcome in CONTRIBUTORS, Michael! ":-)"#perlfr Tue Nov 1 19:33 CET 2005 <@BooK> bon, je sais toujours pas comment appeler mon module moi <@BooK> AMS::RemoteSource ? < misc> RemoteListing ? <@BooK> RemoteList, même SEE ALSOAcme::MetaSyntactic, Acme::MetaSyntactic::List, Acme::MetaSyntactic::Locale.COPYRIGHTCopyright 2005-2012 Philippe 'BooK' Bruhat, All Rights Reserved.LICENSE This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Visit the GSP FreeBSD Man Page Interface. |