Revision history for Perl module XML::RSS::Feed / XML::RSS::Headline
2.32 6/30/2008
- add URI::Escape as a prereq.
2.31 6/30/2008
- update README from pod
- remainder of perlcritic changes
- init local var in slurp
- my $xml = do { local $/, <$fh> };
+ my $xml = do { local $/ = undef, <$fh> };
- implictly use decode_entities from HTML::Entities
- use HTML::Entities;
+ use HTML::Entities qw(decode_entities);
- use character classes and break up log compiled regexes into chunks
- my $stripit = qr/
- http\:\/\/
- go\.fark\.com\/
- cgi\/fark\/go\.pl\?
- IDLink\=\d+\&
- location\=
- /x;
+ my $domain = qr{ http [:] [/] [/] go [.] fark [.] com }x;
+ my $uri = qr{ [/] cgi [/] fark [/] go [.] pl }x;
+ my $args = qr{ [?] IDLink [=] \d+ [&] location [=] }x;
2.3 6/26/2008
- new constructor param "init_headlines_seen" so you can fetch a feed,
mark everything as seen, then only get updates after the fact.
Thanks to Carl Fürstenberg for suggesting.
- Applied Aaron Krowne's patch for XML::RSS::Headline to use guid instead
of the url if available. Thanks Aaron!
- wrote t/021_headline_guid.t for XML::RSS::Headline->guid
- fix t/008_store_retrieve.t to check if not only is /tmp a dir but also if
its writeable. This fixes testing errors reported by Slaven Rezić.
- Also no longer use LWP::Simple to try to call jbisbee.com/rsstest, just
hard code the XML in the test because jbisbee.com no longer exists.
- wrote tests for coverage of the 'init_headlines_seen' param.
- make some of the logic a bit easier to read the first time through
- Added Carp as a prerequsiste
- fixed 013_legacy.t to skip if File::Temp isn't isntalled
- perlcritic updates
- use carp instead of warn for errors (not for debug)
- moved all the pod to after __END__
- three argument open
- use constant DEFAULT_DELAY for the default delay between fetches (3600)
- no shifting of @_, unpack all args at once (except for accessors)
- return statments on each sub
- changed any double quoted string that didn't need to be interpolated to
a single quoted string.
- migrated code from CVS to git. added .gitignore file to repository
2.212 11/06/2006
2.211 11/05/2006
2.21 11/01/2006
2.1
2.04
2.03
2.02
2.01
2.0
1.1
1.05
1.04
1.03
1.02
1.01
1.00
headline => "headline", url => "http://..." ); $feed->post_process;
This was implemented to support using POE::Filter::XML as a non-
blocking way to parse feeds rather than using the block XML::RSS
via PoCo::RSSAggregator
- removed failed_to_parse and failed_to_fetch
- changed default delay from 600 to 3600
- added description set/get method to XML::RSS::Headline
- changed XML::RSS::Feed->headlines to check 'wantarray' so you get
either an array or an array ref based on context.
- you can now create a XML::RSS::Headline object by either passing in
an XML::RSS item datastructure
my $headline = XML::RSS::Headline->new(
item => {
title => "blah",
link => "http://blah.blash",
more => "..."
},
headline_as_id => 1, # bool value
);
or you can just pass in a headline and url which makes a lot more
sense. (LotR asked me why I did initated the object with the
XML::RSS item structure... I did it because I'm LAZY ok) :P
my $headline = XML::RSS::Headline->new(
headline => "blah",
url => "http://blah.blash",
headline_as_id => 1, # bool value
);
- Moved XML::RSS::Headline to its own package and wrote actual
pod to describes its accessors. XML::RSS::Headline objects are
returned by XML::RSS::Feed->late_breaking_news and merlyn suggested
it would be nice to see what methods could be called upon the
the returned headline object.
0.25
0.20
0.11
0.10
package XML::RSS::Headline::PerlJobs;
use strict;
use XML::RSS::Feed;
use base qw(XML::RSS::Headline);
sub headline {
my ($self) = @_;
# no idea why they use 'http://jobs.perl.org/rss/' as a hash key
my $sub_hash = $self->{item}{'http://jobs.perl.org/rss/'};
return "$self->{item}{title}\n$sub_hash->{company_name} - "
. "$sub_hash->{location}\n"
. "$sub_hash->{hours}, "
. "$sub_hash->{employment_terms}";
}
1;
Which produced a more detailed headline than you would normally get.
This example is from rssbot on irc.perl.org in channel #news.
<rssbot> + Part Time Perl
<rssbot> Brian Koontz - United States, TX, Dallas
<rssbot> Part time, Independent contractor (project-based)
<rssbot> http://jobs.perl.org/job/950
- removed buildheadline because this was fixed by sublcassing
XML::RSS::Headline instead of XML::RSS::Feed;
- changed late breaking news to use scalar instead of quote
scalar @{$self->{late_breaking_news}};
instead of
"@{$self->{late_breaking_news}}";
0.01