-
-
08 Jun 2003 23:17:05 UTC
- Distribution: Syndication-ESF
- Module version: 0.01
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues
- Testers (2 / 0 / 0)
- Kwalitee
Bus factor: 1- License: unknown
- Activity
24 month- Tools
- Download (3.53KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- unknown
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Syndication::ESF - Create and update ESF files
SYNOPSIS
use Syndication::ESF; my $esf = Syndication::ESF->new; $esf->parsefile( 'my.esf' ); $esf->channel( title => 'My channel' ); $esf->add_item( date => time title => 'new item' link => 'http://example.org/#foo' ); print "Channel: ", $esf->channel( 'title' ), "\n"; print "Items : ", scalar @{ $esf->{ items } }, "\n"; my $output = $esf->as_string; $esf->save( 'my.esf' );
DESCRIPTION
This module is the basic framework for creating and maintaing Epistula Syndication Format (ESF) files. More information on the format can be found at the Aquarionics web site: http://www.aquarionics.com/article/name/esf
This module tries to copy the XML::RSS module's interface. All applicable methods have been copied and should respond in the same manner.
Like in XML::RSS, channel data is accessed through the
channel()
sub, and item data is accessed straight out of the items array.METHODS
- new()
-
Creates a new Syndication::ESF object. It currently does not accept any parameters.
- channel(title => $title, contact => $contact, link => $link)
-
Supplying no parameters will give you a reference to the channel data. Specifying a field name returns the value of the field. Giving it a hash will update the channel data with the supplied values.
- add_item(date => $date, title => $title, link => $link, mode => $mode)
-
By default, this will append the new item to the end of the list. Specifying
'insert'
for themode
parameter adds it to the front of the list. - parse($string)
-
Parse the supplied raw ESF data.
- parsefile($filename)
-
Same as
parse()
, but takes a filename as input. - as_string()
-
Returns the current data stored in the object as a string.
- save($filename)
-
Saves the value of
as_string()
to the supplied filename.
BUGS
If you have any questions, comments, bug reports or feature suggestions, email them to Brian Cassidy <brian@alternation.net>.
CREDITS
This module was written by Brian Cassidy (http://www.alternation.net/).
LICENSE
This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License, distributed with Perl.
SEE ALSO
XML::RSS
Module Install Instructions
To install Syndication::ESF, copy and paste the appropriate command in to your terminal.
cpanm Syndication::ESF
perl -MCPAN -e shell install Syndication::ESF
For more information on module installation, please visit the detailed CPAN module installation guide.