Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Dancer::Plugin::Feed(3User Contributed Perl DocumentatiDancer::Plugin::Feed(3)

NAME
       Dancer::Plugin::Feed - Easy to generate feed rss	or atom	for Dancer
       applications.

VERSION
       version 1.131470

SYNOPSIS
	   use 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;

DESCRIPTION
       Provides	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.

CONFIGURATION
	plugins:
	  Feed:
	    title: my great feed
	    format: Atom

FUNCTIONS
   create_feed
       This function returns a XML feed. All parameters	can be define in the
       configuration

       AcceptEd	parameters are:

       format (required)
	   The Content-Type header will	be set to the appropriate value

       entries
	   An arrayref containing a list of entries. Each item will be
	   transformed to an XML::Feed::Entry object. Each entry is an
	   hashref. Some common	attributes for these hashrefs are "title",
	   "link", "summary", "content", "author", "issued" and	"modified".
	   Check XML::Feed::Entry for more details.

       title
       base
       link
       tagline
       description
       author
       language
       copyright
       self_link
       modified

   create_atom_feed
       This method call	create_feed by setting the format to Atom.

   create_rss_feed
       This method call	create_feed by setting the format to RSS.

Exception
       FeedNoFormat
       FeedInvalidFormat

CONTRIBUTING
       This module is developed	on Github at:

       <http://github.com/hobbestigrou/Dancer-Plugin-Feed>

       Feel free to fork the repo and submit pull requests

ACKNOWLEDGEMENTS
       Alexis Sukrieh and Franck Cuny

BUGS
       Please report any bugs or feature requests in github.

SUPPORT
       You can find documentation for this module with the perldoc command.

	   perldoc Dancer::Plugin::Feed

SEE ALSO
       Dancer XML::Feed	XML::Feed::Entry

AUTHOR
       Natal NgA(C)tal

COPYRIGHT AND LICENSE
       This software is	copyright (c) 2013 by Natal NgA(C)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.

perl v5.32.0			  2013-05-27	       Dancer::Plugin::Feed(3)

NAME | VERSION | SYNOPSIS | DESCRIPTION | CONFIGURATION | FUNCTIONS | Exception | CONTRIBUTING | ACKNOWLEDGEMENTS | BUGS | SUPPORT | SEE ALSO | AUTHOR | COPYRIGHT AND LICENSE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Dancer::Plugin::Feed&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help