|
NAMEDancer::Plugin::Feed - Easy to generate feed rss or atom for Dancer applications.VERSIONversion 1.131470SYNOPSISuse Dancer; use Dancer::Plugin::Feed; use Try::Tiny; get '/feed/:format' => sub { my $feed; try { $feed = create_feed( format => params->{format}, title => 'my great feed', entries => [ map { title => "entry $_" }, 1 .. 10 ], ); } catch { my ( $exception ) = @_; if ( $exception->does('FeedInvalidFormat') ) { return $exception->message; } elsif ( $exception->does('FeedNoFormat') ) { return $exception->message; } else { $exception->rethrow; } }; return $feed; }; dance; DESCRIPTIONProvides an easy way to generate RSS or Atom feed. This module relies on XML::Feed. Please, consult the documentation of XML::Feed and XML::Feed::Entry.CONFIGURATIONplugins: Feed: title: my great feed format: Atom FUNCTIONScreate_feedThis function returns a XML feed. All parameters can be define in the configurationAcceptEd parameters are:
create_atom_feedThis method call create_feed by setting the format to Atom.create_rss_feedThis method call create_feed by setting the format to RSS.Exception
CONTRIBUTINGThis module is developed on Github at:<http://github.com/hobbestigrou/Dancer-Plugin-Feed> Feel free to fork the repo and submit pull requests ACKNOWLEDGEMENTSAlexis Sukrieh and Franck CunyBUGSPlease report any bugs or feature requests in github.SUPPORTYou can find documentation for this module with the perldoc command.perldoc Dancer::Plugin::Feed SEE ALSODancer XML::Feed XML::Feed::EntryAUTHORNatal NgétalCOPYRIGHT AND LICENSEThis software is copyright (c) 2013 by Natal Ngétal.This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Visit the GSP FreeBSD Man Page Interface. |