XML-RSS-Feed-2.212/0000755000175000017500000000000010523620301013246 5ustar jbisbeejbisbeeXML-RSS-Feed-2.212/t/0000755000175000017500000000000010523620301013511 5ustar jbisbeejbisbeeXML-RSS-Feed-2.212/t/001_load.t0000755000175000017500000000671410456772231015227 0ustar jbisbeejbisbee#!/usr/bin/perl use strict; use warnings; use Test::More tests => 27; BEGIN { use_ok('XML::RSS::Feed'); use_ok('XML::RSS::Headline'); use_ok('Time::HiRes'); } $SIG{__WARN__} = build_warn("Invalid argument"); isa_ok( XML::RSS::Feed->new( url => "http://www.jbisbee.com/rdf/", name => 'jbisbee', delay => 7200, bad_arg => 1, debug => 1, ), "XML::RSS::Feed" ); $SIG{__WARN__} = build_warn("No cache file found"); isa_ok( XML::RSS::Feed->new( title => "This is a fake RSS Title", name => 'jbisbee_test', url => "http://www.jbisbee.com/rsstest", tmpdir => 'pretend_tmpdir', debug => 1, ), "XML::RSS::Feed" ); isa_ok( XML::RSS::Headline->new( url => "http://www.jbisbee.com/testurl/1", headline => "Test Headline", ), "XML::RSS::Headline" ); isa_ok( XML::RSS::Headline->new( url => "http://www.jbisbee.com/testurl/1", description => "Test Headline", ), "XML::RSS::Headline" ); $SIG{__WARN__} = build_warn("Failed to set headline"); ok( !XML::RSS::Headline->new( url => "http://www.jbisbee.com/testurl/1", description => ".", ), "Bad description" ); isa_ok( XML::RSS::Headline->new( url => "http://www.jbisbee.com/testurl/1", headline => "Test Headline", description => "Test Description", ), 'XML::RSS::Headline', 'via url/headline/description' ); isa_ok( XML::RSS::Headline->new( url => "http://www.jbisbee.com/testurl/1", headline => "Test Headline", first_seen => Time::HiRes::time(), ), 'XML::RSS::Headline', 'set first_seen' ); isa_ok( XML::RSS::Headline->new( item => { link => "http://www.jbisbee.com/testurl/1", title => "Test Headline", }, ), 'XML::RSS::Headline', 'via $args{item} - link/title' ); isa_ok( XML::RSS::Headline->new( item => { link => "http://www.jbisbee.com/testurl/1", title => "Test Headline", description => "Test Description", }, ), 'XML::RSS::Headline', 'via $args{item} - link/title/description' ); $SIG{__WARN__} = build_warn("Invalid argument"); isa_ok( XML::RSS::Headline->new( url => "http://www.jbisbee.com/testurl/1", headline => "Test Headline", description => "Test Description", bad_arg => "bad argument" ), "XML::RSS::Headline" ); $SIG{__WARN__} = build_warn("item must contain either title/link or description/link"); ok( !XML::RSS::Headline->new( item => { title => "Test Headline", description => "Test Description" } ), "Failed to instantiate" ); $SIG{__WARN__} = build_warn("item must contain either title/link or description/link"); ok( !XML::RSS::Headline->new( item => { fake => 1 } ), "Failed to instantiate" ); $SIG{__WARN__} = build_warn( "Either item, url/headline. or url/description are required"); ok( !XML::RSS::Headline->new, "Failed to instantiate" ); ok( !XML::RSS::Headline->new( headline => "Test Headline" ), "Failed to instantiate" ); ok( !XML::RSS::Headline->new( url => "http://www.jbisbee.com/testurl/1" ), "Failed to instantiate" ); sub build_warn { my @args = @_; return sub { my ($warn) = @_; like( $warn, qr/$_/i, $_ ) for @args }; } XML-RSS-Feed-2.212/t/019_fark.t0000755000175000017500000004003710456772231015240 0ustar jbisbeejbisbee#!/usr/bin/perl use strict; use warnings; use Test::More tests => 6; BEGIN { use_ok('XML::RSS::Feed'); use_ok('XML::RSS::Headline::Fark'); } my $feed = XML::RSS::Feed->new( name => 'fark', url => "http://jobs.perl.org/rss/standard.rss", hlobj => "XML::RSS::Headline::Fark" ); isa_ok( $feed, "XML::RSS::Feed" ); ok( $feed->parse( xml(1) ), "Parse Fark XML" ); my $headline = ( $feed->headlines )[0]; is( $headline->headline, q|Netscape intern editing CNN names pic of GWB "a$$hole.jpg" -- unemployment ensues|, "Fark headline matched" ); is( $headline->url, q|http://www.worldnetdaily.com/news/article.asp?ARTICLE_ID=41291|, "Fark url matched" ); sub xml { my ($index) = @_; $index--; return ( q| Fark http://www.fark.com/ It's not news, it's fark Fark RSS http://img.fark.com/images/2002/links/fark.gif http://www.fark.com/ [Amusing] Netscape intern editing CNN names pic of GWB &quot;a$$hole.jpg&quot; -- unemployment ensues http://go.fark.com/cgi/fark/go.pl?IDLink=1200416&location=http://www.worldnetdaily.com/news/article.asp%3fARTICLE_ID=41291 [Drudge] [Cool] Toy factory looking to hire 20 children as advisors at $12,000 annually http://go.fark.com/cgi/fark/go.pl?IDLink=1199711&location=http://www.chinadaily.com.cn/english/doc/2004-11/04/content_388540.htm (chinadaily.com) [Amusing] Words you thought you'd never see together: Vatican Sex Guide http://go.fark.com/cgi/fark/go.pl?IDLink=1200017&location=http://www.disinfo.com/site/displayarticle6980.html [Canada.com] [Cool] &quot;Grand Theft Auto: San Andreas&quot; gets two thumbs up http://go.fark.com/cgi/fark/go.pl?IDLink=1199708&location=http://www.lancasteronline.com/pages/news/ap/4/games_grand_theft (LancasterOnline.com) [Misc] Today's &quot;extremely shiny truck spill&quot; story brought to you by Mount Pleasant, NY http://go.fark.com/cgi/fark/go.pl?IDLink=1199641&location=http://www.thejournalnews.com/newsroom/110404/b0104greentruck.html (NY Journal News) [Strange] I thought I was a geek until I read this article: Sci-fi fans called into an alternate reality http://go.fark.com/cgi/fark/go.pl?IDLink=1199766&location=http://news.com.com/Sci-fi%2Bfans%2Bcalled%2Binto%2Ban%2Balternate%2Breality/2100-1023_3-5438916.html%3ftag=nefd.hed [C\|Net] [Hero] In an effort to attract more worshippers, Canterbury Cathedral revives its 300-year-old tradition of serving beer http://go.fark.com/cgi/fark/go.pl?IDLink=1199568&location=http://news.bbc.co.uk/1/hi/england/kent/3978293.stm [BBC] [Sad] America's prison system at work: Man released from prison, promptly goes home and stabs wife in the neck http://go.fark.com/cgi/fark/go.pl?IDLink=1199687&location=http://story.news.yahoo.com/news%3ftmpl=story%26cid=391%26e=3%26u=/ibsys/20041104/lo_ksat/2439167 [Yahoo] [Interesting] The best WiFi hotels http://go.fark.com/cgi/fark/go.pl?IDLink=1199526&location=http://www.hotelchatter.com/story/2004/11/2/201522/957 (Hotel Chatter) [Scary] Old and busted: pirate ship, new hotness: skycrane http://go.fark.com/cgi/fark/go.pl?IDLink=1199670&location=http://greenvilleonline.com/news/2004/11/04/2004110452322.htm (Greenvilleonline) [Misc] Locusts invade Lebanon (with weird pic) http://go.fark.com/cgi/fark/go.pl?IDLink=1199519&location=http://www.dailystar.com.lb/article.asp%3fedition_id=1%26categ_id=2%26article_id=9861 (Some Guy) [Sad] Elizabeth Edwards diagnosed with breast cancer http://go.fark.com/cgi/fark/go.pl?IDLink=1200026&location=http://www.msnbc.msn.com/id/6408022 [MSNBC] [Photoshop] Photoshop the teaser poster for Star Wars Episode III: Revenge of the Sith http://forums.fark.com/cgi/fark/comments.pl?IDLink=1193002 (Starwars.com) [Interesting] Scientists closing in on discovering why time flows in only one direction. Art Bell surrenders http://go.fark.com/cgi/fark/go.pl?IDLink=1199554&location=http://www.spaceref.com/news/viewpr.html%3fpid=15407 (Some time traveller) [Cool] Computerized rat brain flies flight simulator. Sarah Connor unavailable for comment http://go.fark.com/cgi/fark/go.pl?IDLink=1199501&location=http://www.cnn.com/2004/TECH/11/02/brain.dish/index.html [CNN] [Dumbass] Man, 46, survives jump into lion's den after trying to convert lions to Christianity (with pic) http://go.fark.com/cgi/fark/go.pl?IDLink=1199487&location=http://www.local6.com/news/3887764/detail.html#sillyman (Some Guy) [NewsFlash] Like Franco before him, Arafat not dead http://go.fark.com/cgi/fark/go.pl?IDLink=1199930&location=http://abcnews.go.com/International/wireStory%3fid=226597 [ABC News] [Scary] Rat causes school bus wreck. &quot;The rat got underneath the gas pedal and she hit the brake, and that's when we went off the road,&quot; he said. &quot;All I remember is being rolled around, like I was in a washing machine&quot; http://go.fark.com/cgi/fark/go.pl?IDLink=1199538&location=http://www.montgomeryadvertiser.com/NEWSV5/storyV5BUSCRASH04W.htm (Some Guy) [PSA] Seattle Fark Party this Sunday 1:00 pm at Jillians. Drew's going to be there and hung over from the Vancouver party, let's have some beers and watch football http://go.fark.com/cgi/fark/go.pl?IDLink=1199125&location=http://www.fark.com [FARK] This RSS feed powered by www.pluck.com http://www.pluck.com/?GCID=C12286x007 Download Pluck and extend Internet Explorer with free tools to read RSS feeds, synchronize bookmarks, share web research and power search eBay, Google and more. Adware and spyware free. [PSA] Vancouver Fark Party this Saturday 8pm at the Jolly Taxpayer's Pub. Drew's gonna be in town, let's have some beers http://go.fark.com/cgi/fark/go.pl?IDLink=1199124&location=http://www.fark.com [FARK] [Followup] Email spammers found guilty. Sentenced to serve nine long years in a federal pound-me-in-the-ass prison. Time to tell your cellmates not to buy penis-enlargement pills http://go.fark.com/cgi/fark/go.pl?IDLink=1199695&location=http://www.usatoday.com/money/industries/technology/2004-11-03-spam_x.htm [USA Today] [Amusing] The softer side of rugby http://go.fark.com/cgi/fark/go.pl?IDLink=1199499&location=http://www.nbc4.tv/news/3887638/detail.html [AP] [Cool] The coolest pic you'll see today: NGC 7023, The Iris Nebula http://go.fark.com/cgi/fark/go.pl?IDLink=1199460&location=http://antwrp.gsfc.nasa.gov/apod/ap041104.html (Some Astronomer) [Interesting] A fire that broke out more than 100 years ago at a Chinese coalfield has finally been extinguished. Burning coal emitted 100,000 tons of harmful gases -- including carbon monoxide, sulphur dioxide and 40,000 tons of ashes every year http://go.fark.com/cgi/fark/go.pl?IDLink=1199452&location=http://news.bbc.co.uk/1/hi/world/asia-pacific/3978329.stm [BBC] [Amusing] Roma Tre University makes students an offer thay can't refuse: Learn all about the Mafia in 20 hours http://go.fark.com/cgi/fark/go.pl?IDLink=1199464&location=http://iol.co.za/index.php%3fset_id=1%26click_id=29%26art_id=qw1099542240250B213 [IOL] [Unlikely] Elton John wants to develop sitcom based on aging rock stars, claims &quot;it's a little bit funny&quot; http://go.fark.com/cgi/fark/go.pl?IDLink=1199433&location=http://www.reuters.co.uk/newsPackageArticle.jhtml%3ftype=entertainmentNews%26storyID=615186%26section=news [Reuters] [Photoshop] What if other popular movies were performed by puppets? http://forums.fark.com/cgi/fark/comments.pl?IDLink=1192795 (The Strings Made Me Do It) [NewsFlash] Arafat enters coma. Aides claim he's just taking a long nap http://go.fark.com/cgi/fark/go.pl?IDLink=1199445&location=http://olympics.reuters.com/newsArticle.jhtml%3ftype=topNews%26storyID=6712740 [Reuters] [Interesting] Texas man on death row commits suicide by hanging. Efforts to resuscitate him fail, denying the criminal justice system all the fun http://go.fark.com/cgi/fark/go.pl?IDLink=1199307&location=http://cbsnewyork.com/national/BRF--DeathRowDeath-aa/resources_news_html [CBS News] [Strange] Kirstie Alley asks publicist to breast feed her pet possum http://go.fark.com/cgi/fark/go.pl?IDLink=1198797&location=http://www.azcentral.com/offbeat/articles/1102kirstie02-ON.html [AZCentral] [Scary] Couple on fishing jaunt meet particularly gruesome end after getting caught up in the net roller http://go.fark.com/cgi/fark/go.pl?IDLink=1199319&location=http://mdn.mainichi.co.jp/news/20041103p2a00m0dm012002c.html [MDN] [Ironic] Al Sharpton rescues man who was laid off from his job of shoveling manure http://go.fark.com/cgi/fark/go.pl?IDLink=1199039&location=http://www.ncbuy.com/news/2004-11-03/1010987.html [NCBuy] [Dumbass] Man buys tiny-ass beach hut, with no toilet, for $180,000 http://go.fark.com/cgi/fark/go.pl?IDLink=1199035&location=http://www.yorkshiretoday.co.uk/ViewArticle2.aspx%3fSectionID=55%26ArticleID=881136 (Yorkshire Today) [Florida] Ohio avoids next &quot;Florida&quot; tag as Kerry concedes -- amusing because that's the actual headline, and true http://go.fark.com/cgi/fark/go.pl?IDLink=1199112&location=http://story.news.yahoo.com/news%3ftmpl=story%26cid=584%26e=7%26u=/nm/20041103/pl_nm/election_ohio_dc [Yahoo] [Amusing] For auction: Michael Moore's relevance. Shipping is free because it's so tiny http://go.fark.com/cgi/fark/go.pl?IDLink=1199079&location=http://cgi.ebay.com/ws/eBayISAPI.dll%3fViewItem%26category=1469%26item=3850553305%26rd=1 [eBay] [Scary] Liquid heroin found in fruit juice boxes labeled &quot;Hit Fruit Drink&quot; http://go.fark.com/cgi/fark/go.pl?IDLink=1198957&location=http://apnews.myway.com//article/20041104/D864NUP80.html [AP] [Obvious] Why Bush won http://go.fark.com/cgi/fark/go.pl?IDLink=1199249&location=http://www.corporatemofo.com/stories/041103whybushwon.htm [Corporate Mofo] [Weird] Groundskeeper finds grenade shell on Wrigley Field. Insert Cubs joke here http://go.fark.com/cgi/fark/go.pl?IDLink=1198725&location=http://apnews.myway.com//article/20041103/D864KVQG1.html [AP] This RSS feed powered by www.pluck.com http://www.pluck.com/?GCID=C12286x007 Download Pluck and extend Internet Explorer with free tools to read RSS feeds, synchronize bookmarks, share web research and power search eBay, Google and more. Adware and spyware free. [Cool] New features of Beagle 3 lander include installing antenna on top and camera for live video of death plunge to surface http://go.fark.com/cgi/fark/go.pl?IDLink=1198536&location=http://news.bbc.co.uk/2/hi/science/nature/3977967.stm [BBC] [NewsFlash] Arafat nearly dead in French hospital. Israeli troops sent to help &quot;stabilize his condition&quot; http://go.fark.com/cgi/fark/go.pl?IDLink=1199118&location=http://story.news.yahoo.com/news%3ftmpl=story%26u=/ap/20041104/ap_on_re_mi_ea/arafat%26cid=540%26ncid=716 [AP] [News] Drudge: Ashcroft to resign in &quot;next few days&quot; http://go.fark.com/cgi/fark/go.pl?IDLink=1199087&location=http://www.drudgereportarchives.com/data/2004/11/04/20041104_022200.htm [Drudge] [Strange] Naked man boards moving jumbo jet after being refused ticket http://go.fark.com/cgi/fark/go.pl?IDLink=1198778&location=http://story.news.yahoo.com/news%3ftmpl=story%26u=/nm/20041103/od_uk_nm/oukoe_odd_jet%26e=2 [Yahoo] [Boobies] Serena Williams wears a see-through dress. The Yahoo is there http://go.fark.com/cgi/fark/go.pl?IDLink=1198252&location=http://news.yahoo.com/news%3ftmpl=story2%26u=/041102/ids_photos_en/r3530771616.jpg%26e=2%26ncid=1778 [Yahoo] [Scary] Man in small plane decides to go shopping at Target (with video) http://go.fark.com/cgi/fark/go.pl?IDLink=1198453&location=http://www.wistv.com/Global/story.asp%3fS=2514272%26nav=0RaMSgr8 (wistv.com) [Strange] Staffordshire terrier talks and takes care of cats http://go.fark.com/cgi/fark/go.pl?IDLink=1198243&location=http://www.funreports.com/2004/11/03/56958.html [FunReports] [Hero] Five-year-old boy delivers baby http://go.fark.com/cgi/fark/go.pl?IDLink=1198320&location=http://www.boston.com/news/odd/articles/2004/11/03/five_year_old_boy_helps_mom_deliver_baby [Boston Globe] [Spiffy] Scientists set to launch Deep Impact at the end of year: &quot;We're going to hit it and see what happens&quot; http://go.fark.com/cgi/fark/go.pl?IDLink=1198562&location=http://dsc.discovery.com/news/briefs/20041101/deepimpact.html [Discovery] [Stupid] Small company successfully patents the most obvious use of the Internet -- international sales -- and sues Dell http://go.fark.com/cgi/fark/go.pl?IDLink=1197989&location=http://money.cnn.com/2004/11/02/technology/dell_de [CNN] | )[$index]; } XML-RSS-Feed-2.212/t/020_useperljournals.t0000755000175000017500000001455110456772231017544 0ustar jbisbeejbisbee#!/usr/bin/perl use strict; use warnings; use Test::More tests => 6; BEGIN { use_ok('XML::RSS::Feed'); use_ok('XML::RSS::Headline::UsePerlJournals'); } my $feed = XML::RSS::Feed->new( name => 'useperljournals', hlobj => "XML::RSS::Headline::UsePerlJournals", url => "http://use.perl.org/search.pl?tid=&query=&author=&" . "op=journals&content_type=rss", ); isa_ok( $feed, "XML::RSS::Feed" ); ok( $feed->parse( xml(1) ), "Parse Fark XML" ); my $headline = ( $feed->headlines )[0]; is( $headline->headline, q|[Ovid] The Real CPAN Limitation|, "use Perl; Journal headline matched" ); is( $headline->url, q|http://use.perl.org/~Ovid/journal/21897?from=rss|, "use Perl; Journal url matched" ); sub xml { my ($index) = @_; $index--; return ( q| use Perl Journal Search http://use.perl.org/search.pl use Perl Journal Search en-us use Perl; is Copyright 1998-2004, Chris Nandor. Stories, comments, journals, and other submissions posted on use Perl; are Copyright their respective owners. 2004-11-17T19:14:51+00:00 pudge pudge@perl.org Technology hourly 1 1970-01-01T00:00+00:00 use Perl Journal Search http://use.perl.org/images/topics/useperl.gif http://use.perl.org/search.pl The Real CPAN Limitation (2004.11.17 12:04) http://use.perl.org/~Ovid/journal/21897?from=rss Business readiness of programming languages (2004.11.17 10:20) http://use.perl.org/~gabor/journal/21896?from=rss google for.. uagent stopped msie (2004.11.17 8:36) http://use.perl.org/~TeeJay/journal/21895?from=rss Old and/or stuffy (2004.11.17 8:23) http://use.perl.org/~TorgoX/journal/21894?from=rss Perl scripting of Scite (2004.11.17 7:17) http://use.perl.org/~spur/journal/21893?from=rss Do they have sheep? Do people marry there? (2004.11.17 6:21) http://use.perl.org/~TorgoX/journal/21892?from=rss Cowered in the gloom (2004.11.17 6:19) http://use.perl.org/~TorgoX/journal/21891?from=rss 15 Pocky, 003525 (2004.11.17 4:48) http://use.perl.org/~TorgoX/journal/21890?from=rss At first the signs (2004.11.17 3:50) http://use.perl.org/~TorgoX/journal/21889?from=rss regex gotcha in P::RD (2004.11.17 2:00) http://use.perl.org/~spur/journal/21888?from=rss Busy again (2004.11.17 1:38) http://use.perl.org/~ethan/journal/21887?from=rss Mailing list software recommendations, please (2004.11.17 1:33) http://use.perl.org/~petdance/journal/21886?from=rss gangsters, pirates, databases (2004.11.16 23:31) http://use.perl.org/~rjbs/journal/21885?from=rss New Cool Journal RSS Feeds at use Perl; (2004.11.16 18:32) http://use.perl.org/~pudge/journal/21884?from=rss The Big Meet (2004.11.16 17:13) http://use.perl.org/~chaoticset/journal/21883?from=rss | )[$index]; } XML-RSS-Feed-2.212/t/016_title_from_description.t0000755000175000017500000005140710456772231021064 0ustar jbisbeejbisbee#!/usr/bin/perl use strict; use warnings; use Test::More tests => 53; BEGIN { use_ok('XML::RSS::Feed') } my $feed = XML::RSS::Feed->new( url => "http://www.jbisbee.com/rdf/", name => 'jbisbee', ); isa_ok( $feed, 'XML::RSS::Feed' ); $SIG{__WARN__} = build_warn("Wide character in print"); my $xml = do { local $/; }; $feed->parse($xml); my $count = 0; for my $headline ( $feed->headlines ) { $count++; ok( $headline->headline, "Headline: $count" ); } my $feed2 = XML::RSS::Feed->new( url => "http://www.jbisbee.com/rdf/", name => 'jbisbee', headline_as_id => 1, ); isa_ok( $feed, 'XML::RSS::Feed' ); $feed2->parse($xml); $count = 0; for my $headline ( $feed2->headlines ) { $count++; ok( $headline->headline, "Headline: $count" ); } sub build_warn { my @args = @_; return sub { my ($warn) = @_; like( $warn, qr/$_/i, $_ ) for @args }; } __DATA__ KYQ http://www.livejournal.com/users/kyq/ KYQ - LiveJournal.com ore_wa@yahoo.com Mon, 01 Nov 2004 10:27:18 GMT LiveJournal / LiveJournal.com http://www.livejournal.com/userpic/13848838/491061 KYQ http://www.livejournal.com/users/kyq/ 100 100 http://www.livejournal.com/users/kyq/65305.html Mon, 01 Nov 2004 10:27:18 GMT ore_wa@yahoo.com http://www.livejournal.com/users/kyq/65305.html Right, I've calmed down quite a bit since the last post, but I still am kicking you-know-who's ass. Not physically, but I basically talked about it with my Company Sergeant Major aka Boss-man and he's gonna be doing extra duties this month. Which means more breaks for me. Heheheheh *snort*. No, actually I don't feel good about it. In fact I feel terrible, I feel like a monster. But it had to be done. If I went easy on him, it'd rob me of credibility, so there. <br /><br />MSG Man chapter 8 is probably the shortest chapter I've done in a while, at only 24 pages. So sorry if it disappoints you. I did take my time to make sure it's drawn better though, and it's a stepping stone to the more exciting developments in the comic, so I hope that makes up for it. I'm planning to use the rest of this week to get the chapter up in the site, and eventually URDrawing (though I have reservations about that).<br /><br />Kang, out. http://www.livejournal.com/users/kyq/65305.html http://www.livejournal.com/users/kyq/65198.html Sun, 31 Oct 2004 03:54:40 GMT ore_wa@yahoo.com http://www.livejournal.com/users/kyq/65198.html Angry doesn't even describe what I'm feeling at the moment. Allow me to elaborate:<br /><br />As you might know, my job in the army is that of an Armskote man, aka He who looks after ze gunz. This is a 24 hour job, so when it's my tour of duty, I've to be in here no matter what, till the end of my duty. Then, one of my assistants comes in and takes over me till the end of his tour of duty. I have 2 assistants, both of whom were store men, and 1 who is going to leave me as he's being posted out. Wait, wait there's more...<br /><br />My current assistant, who has always been, to put it politely, a fucking slacker, never really had my utmost approval in the first place. But as long as he kept coming for his duty, I didn't care. Just last week though, despite ALREADY having ASKED him at the start of the month "Which days do you wish to have (to take a day off for)?", he told me at the last minute that his birthday was on the 29th. Since it's always nice to celebrate your birthday and have the weekend off too, I OFFERED to exchange weekend duties with him anyway despite me having the power to say no. He declined, saying that he'll find a way to still enjoy his birthday and come for duty. Fair enough. <br /><br />Just 2 days ago, he called me and asked if he could come for duty a bit later, as he feared that he'd be too drunk to come. Rather annoyed, but still I understood it was his birthday and let him come an hour later. What does he do? On Saturday morning, his mother calls telling me he's too sick to come. I talk to him and true enough he sounds sick. I gave him some verbal lashing and then told him to come tomorrow (sunday, which is today) for duty. Guess what? He didn't even bother to call me this morning, as according to his mother, he's in fucking hospital.<br /><br />Now it's his RESPONSIBILITY as an Armskote man to make sure he's WELL ENOUGH to come for HIS duty. I can say, have NEVER fallen sick and not turned up for duty, neither have I deliberately pulled off any sort of stunt to skive on my duties either. True, he might be so fucking sick he couldn't crawl out of bed. Tough shit. YOU know you have duty the next day, you should know jolly well not to get so fucking piss drunk, get caught in the rain and have a fucking fever!!! Tell me, am I wrong in being angry? Am I wrong in being MOTHER FUCKINGLY FURIOUS?!?! He's spoiled my plans, spoiled my weekend and most of all, spoiled my trust for him. <br /><br /><br />He's going to get it from me. Oh yes he is. <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />On a lighter note, I've finished pencilling MSG Man 8. http://www.livejournal.com/users/kyq/65198.html http://www.livejournal.com/users/kyq/64958.html Thu, 28 Oct 2004 14:39:25 GMT ore_wa@yahoo.com http://www.livejournal.com/users/kyq/64958.html Nothing like sitting in your favourite Transformer shop, chatting with Transformer fan friends (especially my new one who for now will be known as Jazzbot), blaring Transformer music at max volume. Take THAT stupid kinky women's wear shops and your crappy bubblegum music! BOOOYAH!!!! http://www.livejournal.com/users/kyq/64958.html http://www.livejournal.com/users/kyq/64536.html Tue, 26 Oct 2004 02:46:53 GMT Not your daddy's halloween pic ore_wa@yahoo.com http://www.livejournal.com/users/kyq/64536.html <img src="http://msgman.kuiki.net/halloween2k4.jpg"><br /><br />Muahahahahaha. http://www.livejournal.com/users/kyq/64536.html http://www.livejournal.com/users/kyq/64434.html Sun, 24 Oct 2004 13:17:48 GMT Feh.. ore_wa@yahoo.com http://www.livejournal.com/users/kyq/64434.html ..Don't wanna stay in camp. Boring. Work to do. Can't be arsed to do it. <br /><br />Yet, don't wanna go home. Crap to do, like pain-stakingly applying to Unis that probably won't accept me. Can't be arsed to do it. <br /><br />Yet, I probably do wanna go home. Dunno why really. Getting to talk to her is a slight incentive, even though she's just a friend. <br /><br />Aside from that, once again I'm getting no satisfaction from anything anymore. Well, aside from drawing guys in girls' school uniforms. Yeah, that's becoming disturbingly fun. http://www.livejournal.com/users/kyq/64434.html http://www.livejournal.com/users/kyq/64227.html Fri, 15 Oct 2004 10:11:39 GMT ore_wa@yahoo.com http://www.livejournal.com/users/kyq/64227.html An utterly terrible 3 days has almost passed me, filled with stupid people and unreasonable superiors, who all demand the world out from a man who is forced to do a stupid job that is in no way related to my future career whatsoever. Christ I'm tired. And pissed. And stressed. I'm not kidding when I say I could use a hug right now...<br /><br /><br /><br />On the bright side, I've started drawing MSG man 8. Progress has been wonderful. http://www.livejournal.com/users/kyq/64227.html http://www.livejournal.com/users/kyq/63873.html Mon, 11 Oct 2004 14:46:45 GMT ore_wa@yahoo.com http://www.livejournal.com/users/kyq/63873.html <img src="http://msgman.kuiki.net/ruistyle.jpg"><br /><br />omfg soft colours. http://www.livejournal.com/users/kyq/63873.html http://www.livejournal.com/users/kyq/63574.html Mon, 11 Oct 2004 03:20:48 GMT ore_wa@yahoo.com http://www.livejournal.com/users/kyq/63574.html Best way to counter feeling-like-crap ness? Start drawing MSG Man. Which I have, yes. MSG Man chapter 8 is being drawn, hopefully to be out by month's end. http://www.livejournal.com/users/kyq/63574.html http://www.livejournal.com/users/kyq/63427.html Wed, 06 Oct 2004 14:30:44 GMT ore_wa@yahoo.com http://www.livejournal.com/users/kyq/63427.html I've been feeling like crap. Physically and emotionally. Mock me if you will, I don't care. http://www.livejournal.com/users/kyq/63427.html http://www.livejournal.com/users/kyq/63149.html Wed, 29 Sep 2004 00:25:12 GMT ore_wa@yahoo.com http://www.livejournal.com/users/kyq/63149.html I don't know what's wrong with me lately. I've been having such massive mood swings as of late, one moment I feel fine and suddenly I'm either really angry or extremely upset. Mostly upset. Upset about so many things I don't even know what I'm upset about, but I'm upset. I want to break down and sob, but nothing comes out. I don't have anyone I'm comfortable enough with to really talk about anything anymore and let's not even get to my life and hobby. Maybe I need to see a Psychiatrist. I think I'd really need to see one. I just don't find happiness in anything anymore these days and anything that does manage to make me somewhat happy, the effect is only short-lived. If my life was a game, I really feel like just turning the console off now. If only it were that easy... http://www.livejournal.com/users/kyq/63149.html http://www.livejournal.com/users/kyq/62837.html Wed, 22 Sep 2004 04:06:57 GMT ore_wa@yahoo.com http://www.livejournal.com/users/kyq/62837.html <a href="http://msgman.kuiki.net/lsb"><img src="http://msgman.kuiki.net/nico.jpg"></a><br />There isn't a whole lot yet, but La Signora Boss debuts. (click on image) http://www.livejournal.com/users/kyq/62837.html http://www.livejournal.com/users/kyq/62690.html Thu, 16 Sep 2004 19:38:01 GMT Coming soon... ore_wa@yahoo.com http://www.livejournal.com/users/kyq/62690.html <img src="http://msgman.kuiki.net/lasigboss.jpg"> http://www.livejournal.com/users/kyq/62690.html http://www.livejournal.com/users/kyq/62398.html Fri, 10 Sep 2004 00:40:40 GMT My first critic ore_wa@yahoo.com http://www.livejournal.com/users/kyq/62398.html Got my first searing attack on MSG Man, particularly by a bloke named Uni on the URD board. His post got the crap blighted out of it and deleted, but from what I hear he said MSG Man was 'the kind of contribution we don't need' as it 'makes no progress' and blah blah blah... Normally I'd be angry and/or upset, but right now I'm a little tickled and maybe a wee bit ticked. Considering it's from some bloke who hasn't contributed anything more than quality whining, I'd just take him as my first critic.<br /><br />EDIT: OK I lie. I AM upset. There, happy? http://www.livejournal.com/users/kyq/62398.html http://www.livejournal.com/users/kyq/62016.html Fri, 03 Sep 2004 19:00:33 GMT グレート山田アッタク!!! ore_wa@yahoo.com http://www.livejournal.com/users/kyq/62016.html Should have done my pictoral tribute to my fave GGXX character LONG ago<br /><img src="http://msgman.kuiki.net/may.jpg"><br />She is t3h r0x0rz. http://www.livejournal.com/users/kyq/62016.html http://www.livejournal.com/users/kyq/61926.html Thu, 02 Sep 2004 17:10:26 GMT MSG Man Chapter 7: Highly Addictive ore_wa@yahoo.com http://www.livejournal.com/users/kyq/61926.html It's done, YAY!<br /><a href="http://msgman.kuiki.net/season2.html"><img src="http://msgman.kuiki.net/chapter7/msg7cover.jpg"><br>Read it now!</a> http://www.livejournal.com/users/kyq/61926.html http://www.livejournal.com/users/kyq/61495.html Wed, 01 Sep 2004 10:03:29 GMT ore_wa@yahoo.com http://www.livejournal.com/users/kyq/61495.html New purchase<br /><img src="http://msgman.kuiki.net/pinky.jpg"><br /><img src="http://msgman.kuiki.net/pinky2.jpg"><br />God these things are poisonous. http://www.livejournal.com/users/kyq/61495.html http://www.livejournal.com/users/kyq/61265.html Sat, 21 Aug 2004 15:44:39 GMT ore_wa@yahoo.com http://www.livejournal.com/users/kyq/61265.html Back from Perth land, saw a few Unis, met the gang again and well...was a little more than a little boring to be honest, aside from doing the things mentioned earlier. It's back to camp for me tomorrow too, so I'm feeling a little glum. I'd say the usual "I miss you guys" stuff, but I'm gonna be seeing Perth a lot sooner than I think ;). http://www.livejournal.com/users/kyq/61265.html http://www.livejournal.com/users/kyq/61129.html Wed, 11 Aug 2004 13:46:39 GMT In Perth ore_wa@yahoo.com http://www.livejournal.com/users/kyq/61129.html Must not think about work, must not think about work, must not think about work, must not think about work, must not think about work, must not think about work...<br /><br /><br />Oh and I love not being in Singapore. http://www.livejournal.com/users/kyq/61129.html http://www.livejournal.com/users/kyq/60713.html Tue, 03 Aug 2004 14:01:22 GMT ore_wa@yahoo.com http://www.livejournal.com/users/kyq/60713.html What a wonderful day, while waiting for my inconsiderate Ragnarok Online twit of a brother to quit hogging the fucking connection, the PC almost dies. Right after that, I get a call that I'm needed at camp NOW. Yay.<br /><br /><br /><br />But you know what? Instead of growling and cursing as I always do, I feel that I've been doing too much of that. I'll instead do this - everytime I update my LJ for now, I'll say something I LIKE/Love. So here goes...<br /><br /><br />I love my friends, IRL, #rosarian and otherwise. http://www.livejournal.com/users/kyq/60713.html http://www.livejournal.com/users/kyq/60562.html Mon, 02 Aug 2004 19:57:19 GMT ore_wa@yahoo.com http://www.livejournal.com/users/kyq/60562.html I'm starting to hate these two games a whole lot, namely Ragnarok Online and Utopia. Why? Because I know people WHO ALWAYS HOG THE FUCKING COMUPUTER PLAYING NOTHING BUT THESE GODDAMN GAMES THAT'S WHY!!!! DO THEY THINK THEY'RE THE ONLY FUCKERS WHO NEED TO USE THE PC?!?! I DON'T FUCKING CARE WHO YOU ARE, YOU'D BETTER LEARN TO HAVE A BIT OF FUCKING BASIC COURTESY!!! http://www.livejournal.com/users/kyq/60562.html http://www.livejournal.com/users/kyq/60370.html Tue, 27 Jul 2004 10:41:21 GMT We are the children of the internet! ore_wa@yahoo.com http://www.livejournal.com/users/kyq/60370.html sad, ain't it? My bro's been hogging the modem cos he wants to download the stupid Ragnarok Online client onto his lap top (I'm typing from it), and so I've had not much to do. Felt...so...bored.... ah well. (end random babbling) http://www.livejournal.com/users/kyq/60370.html http://www.livejournal.com/users/kyq/60044.html Sun, 25 Jul 2004 09:49:42 GMT DVD vol. 2 ore_wa@yahoo.com http://www.livejournal.com/users/kyq/60044.html Better get it while it's hot folks!<br /><img src="http://msgman.kuiki.net/dvdfour.jpg"> http://www.livejournal.com/users/kyq/60044.html http://www.livejournal.com/users/kyq/59782.html Sun, 25 Jul 2004 08:21:36 GMT ore_wa@yahoo.com http://www.livejournal.com/users/kyq/59782.html Rui just likes getting comfortable<br /><img src="http://msgman.kuiki.net/ruicomf.jpg"><br />If this looks familiar it should. http://www.livejournal.com/users/kyq/59782.html http://www.livejournal.com/users/kyq/59468.html Sat, 24 Jul 2004 16:57:26 GMT ore_wa@yahoo.com http://www.livejournal.com/users/kyq/59468.html Watched Spiderman 2. Pretty..damn...awesome movie...... makes me wish I could an MSG Man movie. http://www.livejournal.com/users/kyq/59468.html http://www.livejournal.com/users/kyq/59286.html Fri, 23 Jul 2004 03:46:18 GMT お前はなぜここに?! ore_wa@yahoo.com http://www.livejournal.com/users/kyq/59286.html Years after my first comic, Jubilation Sensation, died off, once again 2 of my oldest characters will be 'reunited'. <img src="http://msgman.kuiki.net/siblings.jpg"> A bit of a spoiler, but what the hell, not as if anyone REALLY bothers. http://www.livejournal.com/users/kyq/59286.html XML-RSS-Feed-2.212/t/010_deprecated_methods.t0000755000175000017500000000105310456772231020122 0ustar jbisbeejbisbee#!/usr/bin/perl use Test::More tests => 8; BEGIN { use_ok('XML::RSS::Feed') } my $feed = XML::RSS::Feed->new( url => "http://www.jbisbee.com/rdf/", name => 'jbisbee', ); isa_ok( $feed, 'XML::RSS::Feed' ); $SIG{__WARN__} = build_warn("deprecated"); cmp_ok( $feed->failed_to_fetch, 'eq', "", "Verify that failed_to_fetch returns ''" ); cmp_ok( $feed->failed_to_parse, 'eq', "", "Verify that failed_to_parse returns ''" ); sub build_warn { my @args = @_; return sub { my ($warn) = @_; like( $warn, qr/$_/i, $_ ) for @args }; } XML-RSS-Feed-2.212/t/017_perljobs.t0000755000175000017500000001156410456772231016136 0ustar jbisbeejbisbee#!/usr/bin/perl use strict; use warnings; use Test::More tests => 11; BEGIN { use_ok('XML::RSS::Feed'); use_ok('XML::RSS::Headline::PerlJobs'); } my $feed = XML::RSS::Feed->new( name => 'perljobs', url => "http://jobs.perl.org/rss/standard.rss", hlobj => "XML::RSS::Headline::PerlJobs" ); isa_ok( $feed, "XML::RSS::Feed" ); ok( $feed->parse( xml(1) ), "Parse Good Perl Jobs XML" ); is( ( $feed->headlines )[0]->headline, "Mid-senior level Perl/Mod_Perl Programmer\n" . "Links Technology Solutions, Inc. - United States, " . "Arizona, Scottsdale\n" . "Full time, Hourly employee", "Test to make sure headline matches" ); my $feed_no_details = XML::RSS::Feed->new( name => 'perljobs', url => "http://jobs.perl.org/rss/standard.rss", hlobj => "XML::RSS::Headline::PerlJobs" ); isa_ok( $feed_no_details, "XML::RSS::Feed" ); ok( $feed_no_details->parse( xml(2) ), "Parse Good Perl Jobs XML" ); is( ( $feed_no_details->headlines )[0]->headline, "Mid-senior level Perl/Mod_Perl Programmer\n" . "Unknown Location\n" . "Unknown Hours, Unknown Terms", "Test for missing elements" ); my $feed_name_only = XML::RSS::Feed->new( name => 'perljobs', url => "http://jobs.perl.org/rss/standard.rss", hlobj => "XML::RSS::Headline::PerlJobs", ); isa_ok( $feed_name_only, "XML::RSS::Feed" ); ok( $feed_name_only->parse( xml(3) ), "Parse Good Perl Jobs XML" ); is( ( $feed_name_only->headlines )[0]->headline, "Mid-senior level Perl/Mod_Perl Programmer\n" . "Links Technology Solutions, Inc. - Unknown Location\n" . "Unknown Hours, Unknown Terms", "Test for missing elements" ); sub xml { my ($index) = @_; $index--; return ( q| jobs.perl.org http://jobs.perl.org/ The Perl Jobs site Mid-senior level Perl/Mod_Perl Programmer http://jobs.perl.org/job/1942 Links Technology Solutions, Inc. - United States, Arizona, Scottsdale (2004-11-02) Full time United States, Arizona, Scottsdale Links Technology Solutions, Inc. Hourly employee 2004-11-02 |, q| jobs.perl.org http://jobs.perl.org/ The Perl Jobs site Mid-senior level Perl/Mod_Perl Programmer http://jobs.perl.org/job/1942 Links Technology Solutions, Inc. - United States, Arizona, Scottsdale (2004-11-02) |, q| jobs.perl.org http://jobs.perl.org/ The Perl Jobs site Mid-senior level Perl/Mod_Perl Programmer http://jobs.perl.org/job/1942 Links Technology Solutions, Inc. - United States, Arizona, Scottsdale (2004-11-02) Links Technology Solutions, Inc. | )[$index]; } XML-RSS-Feed-2.212/t/008_store_retrieve.t0000755000175000017500000001332010522252422017334 0ustar jbisbeejbisbee#!/usr/bin/perl use strict; use warnings; use Test::More tests => 31; BEGIN { use_ok('XML::RSS::Feed') } SKIP: { skip "/tmp directory doesn't exist", 32 unless -d "/tmp"; $SIG{__WARN__} = build_warn("could not cache"); my $feed_bad_name = XML::RSS::Feed->new( name => 'test_008/_title', url => "http://www.jbisbee.com/rsstest", tmpdir => "/tmp", ); isa_ok( $feed_bad_name, "XML::RSS::Feed" ); ok( $feed_bad_name->parse( xml(1) ), "Parsed XML" ); ok( !$feed_bad_name->cache, "Did Not Cache File" ); my $feed_bad_tmpdir = XML::RSS::Feed->new( name => 'test_008_title', url => "http://www.jbisbee.com/rsstest", tmpdir => "/fake/directory/that/no/one/will/actually/have", ); isa_ok( $feed_bad_tmpdir, "XML::RSS::Feed" ); ok( !$feed_bad_tmpdir->cache, "Did Not Cache File" ); unlink "/tmp/test_008_title.sto"; my $feed_title = XML::RSS::Feed->new( name => 'test_008_title', url => "http://www.jbisbee.com/rsstest", tmpdir => "/tmp", ); isa_ok( $feed_title, "XML::RSS::Feed" ); ok( !$feed_title->cache, "Did Not Cache File" ); ok( $feed_title->parse( xml(1) ), "Parsed XML" ); ok( $feed_title->cache, "Successfully Cached File" ); my $feed_no_title = XML::RSS::Feed->new( name => 'test_008_title', url => "http://www.jbisbee.com/rsstest", tmpdir => "/tmp", ); isa_ok( $feed_no_title, "XML::RSS::Feed" ); my $feed_title_cache = XML::RSS::Feed->new( title => 'Some Stupid Title', name => 'test_008_title', url => "http://www.jbisbee.com/rsstest", tmpdir => "/tmp", ); isa_ok( $feed_title_cache, "XML::RSS::Feed" ); eval { require LWP::Simple }; skip "LWP::Simple not installed", 17 if $@; unlink "/tmp/test_008.sto"; my $feed = XML::RSS::Feed->new( name => 'test_008', url => "http://www.jbisbee.com/rsstest", tmpdir => "/tmp", ); isa_ok( $feed, 'XML::RSS::Feed' ); my $rss_xml = LWP::Simple::get( $feed->url ) || undef; skip "Could not fetch " . $feed->url . " ... timed out", 16 unless $rss_xml; ok( $feed->parse($rss_xml), "Failed to parse XML from " . $feed->url ); cmp_ok( $feed->num_headlines, '==', 10, "Verify correct number of headlines" ); cmp_ok( $feed->late_breaking_news, '==', 10, "Verify mark_all_headlines_read" ); my @headlines_old = map { $_->headline } $feed->headlines; my $num_headlines = $feed->num_headlines; my @seen_old = map { $_->first_seen_hires } $feed->headlines; $feed->cache; my $feed2 = XML::RSS::Feed->new( name => 'test_008', url => "http://www.jbisbee.com/rsstest", tmpdir => "/tmp", ); isa_ok( $feed2, 'XML::RSS::Feed' ); cmp_ok( $num_headlines, '==', $feed2->num_headlines, "Compare after restoring cache" ); my $feed3 = XML::RSS::Feed->new( name => 'test_008', url => "http://www.jbisbee.com/rsstest", tmpdir => "/tmp", ); isa_ok( $feed3, 'XML::RSS::Feed' ); cmp_ok( $num_headlines, '==', $feed3->num_headlines, "Compare after restoring cache" ); unlink "/tmp/test_008.sto"; my @headlines_new = map { $_->headline } $feed2->headlines; my @seen_new = map { $_->first_seen_hires } $feed2->headlines; ok( eq_array( \@headlines_old, \@headlines_new ), "Comparing headlines before and after" ); for my $i ( 0 .. $#seen_old ) { my $num = $i + 1; cmp_ok( $seen_old[$i], '==', $seen_new[$i], "Compare headline $num timestamp_hires" ); } } sub xml { my ($index) = @_; $index--; return ( qq| http://slashdot.org/ News for nerds, stuff that matters Slashdot http://images.slashdot.org/topics/topicslashdot.gif http://slashdot.org/ States Link Databases to Find Tax Cheats http://slashdot.org/article.pl?sid=04/04/04/2021256 Invulnerable, Waterproof PDA http://slashdot.org/article.pl?sid=04/04/04/1814258 Still More on Open Source Usability http://slashdot.org/article.pl?sid=04/04/04/1811226 Moore's Law Limits Pushed Back Again http://slashdot.org/article.pl?sid=04/04/04/182224 Advanced Mobile Phone Tech in Japan http://slashdot.org/article.pl?sid=04/04/04/1754231 Computerized Time Clocks Susceptible to 'Manager Attack' http://slashdot.org/article.pl?sid=04/04/04/1655231 A Completely Separate Ecosystem on Earth http://slashdot.org/article.pl?sid=04/04/04/1653233 3D, FPS File Manager http://slashdot.org/article.pl?sid=04/04/04/1621251 Searching by Shape... http://slashdot.org/article.pl?sid=04/04/04/1423210 New Wave of Web Ads? http://slashdot.org/article.pl?sid=04/04/04/1410251 Search Slashdot Search Slashdot stories query http://slashdot.org/search.pl | )[$index]; } sub build_warn { my @args = @_; return sub { my ($warn) = @_; like( $warn, qr/$_/i, $_ ) for @args }; } XML-RSS-Feed-2.212/t/004_process_items.t0000755000175000017500000000241210456772231017161 0ustar jbisbeejbisbee#!/usr/bin/perl use strict; use warnings; use Test::More tests => 8; BEGIN { use_ok('XML::RSS::Feed') } my $feed = XML::RSS::Feed->new( url => "http://www.jbisbee.com/rdf/", name => 'jbisbee', ); isa_ok( $feed, 'XML::RSS::Feed' ); my $iterations = 100; my $title = "This is a test 1"; my $url = "http://www.jbisbee.com/test/url/1"; my $des = "Description number 1"; my $rss = { channel => { title => "Channel Title", link => "http://www.google.com/", }, items => [], }; for my $i ( 1 .. $iterations ) { push @{ $rss->{items} }, { headline => ++$title, url => ++$url, description => ++$des, }; } $feed->pre_process; $feed->title( $rss->{channel}{title} ); $feed->link( $rss->{channel}{link} ); ok( $feed->process_items( $rss->{items} ), "Process Items" ); $feed->post_process; cmp_ok( $feed->num_headlines, '==', $iterations, "Verify num_headlines $iterations" ); cmp_ok( $feed->late_breaking_news, '==', $iterations, "Verify mark_all_headlines_read" ); cmp_ok( $feed->title, 'eq', $rss->{channel}{title}, "Verify feed title" ); cmp_ok( $feed->link, 'eq', $rss->{channel}{link}, "Verify feed link" ); ok( !$feed->process_items(), "Failed Process Items" ); XML-RSS-Feed-2.212/t/014_last_updated.t0000755000175000017500000000077210456772231016763 0ustar jbisbeejbisbee#!/usr/bin/perl use strict; use warnings; use Test::More tests => 4; use Time::HiRes; BEGIN { use_ok('XML::RSS::Feed') } my $feed = XML::RSS::Feed->new( url => "http://www.jbisbee.com/rdf/", name => 'jbisbee', headline_as_id => 1, ); isa_ok( $feed, 'XML::RSS::Feed' ); my $time = Time::HiRes::time(); $feed->set_last_updated($time); ok( $time == $feed->last_updated_hires, "testing last_updated_hires" ); ok( int($time) == $feed->last_updated, "testing last_updated" ); XML-RSS-Feed-2.212/t/003_process.t0000755000175000017500000000256310456772231015766 0ustar jbisbeejbisbee#!/usr/bin/perl use strict; use warnings; use Test::More tests => 9; BEGIN { use_ok('XML::RSS::Feed') } my $feed = XML::RSS::Feed->new( url => "http://www.jbisbee.com/rdf/", name => 'jbisbee', ); isa_ok( $feed, 'XML::RSS::Feed' ); my $iterations = 100; my $title = "This is a test 1"; my $url = "http://www.jbisbee.com/test/url/1"; my $des = "Description number 1"; my $rss = { channel => { title => "Channel Title", link => "http://www.google.com/", }, items => [], }; for my $i ( 1 .. $iterations ) { push @{ $rss->{items} }, { headline => ++$title, url => ++$url, description => ++$des, }; } ok( $feed->process( $rss->{items}, $rss->{channel}{title}, $rss->{channel}{link} ), "Processing" ); cmp_ok( $feed->num_headlines, '==', $iterations, "Verify num_headlines $iterations" ); cmp_ok( $feed->late_breaking_news, '==', 100, "Verify 100 headlines" ); cmp_ok( $feed->title, 'eq', $rss->{channel}{title}, "Verify feed title" ); cmp_ok( $feed->link, 'eq', $rss->{channel}{link}, "Verify feed link" ); ok( !$feed->process( undef, $rss->{channel}{title}, $rss->{channel}{link} ), "Fail to process" ); $feed->title(" "); cmp_ok( $feed->title, 'eq', $rss->{channel}{title}, "title should fail if set as just spaces" ); XML-RSS-Feed-2.212/t/012_pod_coverage.t0000755000175000017500000000053210456772231016737 0ustar jbisbeejbisbee#!/usr/bin/perl use strict; use warnings; use Test::More; BEGIN { eval { require Test::Pod::Coverage; }; my $test_pod_coverage = $@ ? 0 : 1; sub TEST_POD_COVERAGE {$test_pod_coverage} } if (TEST_POD_COVERAGE) { eval { Test::Pod::Coverage::all_pod_coverage_ok() }; } else { plan skip_all => "Test::Pod::Coverage required"; } XML-RSS-Feed-2.212/t/002_parse.t0000755000175000017500000001166710456772231015426 0ustar jbisbeejbisbee#!/usr/bin/perl use strict; use warnings; use Test::More tests => 12; BEGIN { use_ok('XML::RSS::Feed') } my $feed = XML::RSS::Feed->new( url => "http://www.jbisbee.com/rdf/", name => 'jbisbee', ); isa_ok( $feed, 'XML::RSS::Feed' ); $feed->parse( xml(1) ); cmp_ok( $feed->num_headlines, '==', 10, "Verify 10 Slashdot headlines" ); cmp_ok( $feed->late_breaking_news, '==', 10, "Verify 10 new headlines" ); $feed->parse( xml(1) ); cmp_ok( $feed->num_headlines, '==', 10, "Verify 10 Slashdot headlines" ); cmp_ok( $feed->late_breaking_news, '==', 0, "Verify 0 new headlines" ); $feed->parse( xml(2) ); cmp_ok( $feed->num_headlines, '==', 20, "Verify 20 Slashdot headlines" ); cmp_ok( $feed->late_breaking_news, '==', 10, "Verify 10 new headlines" ); cmp_ok( ref $feed->headlines, 'eq', "ARRAY", "Test getting Headlines as an array ref" ); $feed->hlobj("URI"); $feed->hlobj(undef); cmp_ok( $feed->hlobj, 'eq', 'URI', "attempt to set hlobj to undef" ); ok( !$feed->headline_as_id, "headline_as_id defaults to undef" ); ok( !$feed->debug, "debug defaults to undef" ); sub xml { my $index = shift; $index--; return ( qq| Slashdot http://slashdot.org/ News for nerds, stuff that matters Slashdot http://images.slashdot.org/topics/topicslashdot.gif http://slashdot.org/ XPde 0.5 - A Linux Desktop for Windows Users http://slashdot.org/article.pl?sid=04/04/03/2322233 Canadian Minister Promises to Fix Copyright Law http://slashdot.org/article.pl?sid=04/04/03/2317226 Grand Challenge Videos Posted http://slashdot.org/article.pl?sid=04/04/03/2115226 Make Your Own TRON Costume http://slashdot.org/article.pl?sid=04/04/03/1722215 Gates on Winsecurity http://slashdot.org/article.pl?sid=04/04/03/2112235 Automobiles Evolve to Live Up to Their Name http://slashdot.org/article.pl?sid=04/04/03/2056208 Red Hat Recap http://slashdot.org/article.pl?sid=04/04/03/2047250 ICANN Cracks Down on Invalid WHOIS Data http://slashdot.org/article.pl?sid=04/04/03/1726226 Little Robots Play Soccer http://slashdot.org/article.pl?sid=04/04/03/1724217 NASA Gravity Probe Set for Launch http://slashdot.org/article.pl?sid=04/04/03/1716234 Search Slashdot Search Slashdot stories query http://slashdot.org/search.pl |, qq| Slashdot http://slashdot.org/ News for nerds, stuff that matters Slashdot http://images.slashdot.org/topics/topicslashdot.gif http://slashdot.org/ States Link Databases to Find Tax Cheats http://slashdot.org/article.pl?sid=04/04/04/2021256 Invulnerable, Waterproof PDA http://slashdot.org/article.pl?sid=04/04/04/1814258 Still More on Open Source Usability http://slashdot.org/article.pl?sid=04/04/04/1811226 Moore's Law Limits Pushed Back Again http://slashdot.org/article.pl?sid=04/04/04/182224 Advanced Mobile Phone Tech in Japan http://slashdot.org/article.pl?sid=04/04/04/1754231 Computerized Time Clocks Susceptible to 'Manager Attack' http://slashdot.org/article.pl?sid=04/04/04/1655231 A Completely Separate Ecosystem on Earth http://slashdot.org/article.pl?sid=04/04/04/1653233 3D, FPS File Manager http://slashdot.org/article.pl?sid=04/04/04/1621251 Searching by Shape... http://slashdot.org/article.pl?sid=04/04/04/1423210 New Wave of Web Ads? http://slashdot.org/article.pl?sid=04/04/04/1410251 Search Slashdot Search Slashdot stories query http://slashdot.org/search.pl | )[$index]; } 1; XML-RSS-Feed-2.212/t/006_first_seen.t0000755000175000017500000000123010456772231016442 0ustar jbisbeejbisbee#!/usr/bin/perl use strict; use warnings; use Test::More tests => 3; BEGIN { use_ok('XML::RSS::Feed') } my $feed = XML::RSS::Feed->new( url => "http://www.jbisbee.com/rdf/", name => 'jbisbee' ); isa_ok( $feed, 'XML::RSS::Feed' ); my $title = "This is a test 1"; my $url = "http://www.jbisbee.com/test/url/1"; $feed->pre_process(); $feed->create_headline( headline => ++$title, url => ++$url ) for 1 .. 100; $feed->post_process(); my @headlines = $feed->headlines; my @sorted_headlines = sort { $b->first_seen_hires <=> $a->first_seen_hires } $feed->headlines; ok( eq_array( \@headlines, \@sorted_headlines ), "Validate first_seen_hires" ); XML-RSS-Feed-2.212/t/015_feed_exceptions.t0000755000175000017500000000147010456772231017453 0ustar jbisbeejbisbee#!/usr/bin/perl use strict; use warnings; use Test::More tests => 6; use Time::HiRes; BEGIN { use_ok('XML::RSS::Feed') } my $feed = XML::RSS::Feed->new( url => "http://www.jbisbee.com/rdf/", name => 'jbisbee', headline_as_id => 1, ); $SIG{__WARN__} = build_warn("Failed to parse RSS XML"); $feed->parse("malformed XML string"); ok( $feed->num_headlines == 0, "force parse to fail" ); $feed->process( [] ); ok( $feed->num_headlines == 0, "call process without any items" ); $SIG{__WARN__} = build_warn( "Either item, url/headline. or url/description are required"); $feed->process( [ { bad => 1 } ] ); ok( $feed->num_headlines == 0, "call process with one bad item" ); sub build_warn { my @args = @_; return sub { my ($warn) = @_; like( $warn, qr/$_/i, $_ ) for @args }; } XML-RSS-Feed-2.212/t/018_debug.t0000755000175000017500000001373410456772231015406 0ustar jbisbeejbisbee#!/usr/bin/perl use strict; use warnings; use Test::More tests => 35; BEGIN { use_ok('XML::RSS::Feed') } $SIG{__WARN__} = build_warn("jbisbee"); my $feed = XML::RSS::Feed->new( url => "http://www.jbisbee.com/rdf/", name => 'jbisbee', debug => 1, max_headlines => 10, ); isa_ok( $feed, 'XML::RSS::Feed' ); ok( $feed->parse( xml(1) ), "Parse XML" ); ok( $feed->parse( xml(2) ), "Parse XML" ); $SIG{__WARN__} = build_warn("test_018_debug"); SKIP: { skip "/tmp directory doesn't exist", 26 unless -d "/tmp"; unlink "/tmp/test_018_debug_legacy"; unlink "/tmp/test_018_debug_legacy.sto"; my $xml = xml(1); open my $fh, ">/tmp/test_018_debug_legacy"; print $fh $xml; close $fh; my $feed_legacy_cache = XML::RSS::Feed->new( name => 'test_018_debug_legacy', url => "http://www.jbisbee.com/rsstest", tmpdir => '/tmp', debug => 1, ); isa_ok( $feed_legacy_cache, 'XML::RSS::Feed' ); ok( $feed_legacy_cache->num_headlines == 10, "making sure legacy caching still works" ); my $feed_bad_name = XML::RSS::Feed->new( name => 'test_018_debug/bad_name', url => "http://www.jbisbee.com/rsstest", debug => 1, tmpdir => "/tmp", ); isa_ok( $feed_bad_name, "XML::RSS::Feed" ); ok( $feed_bad_name->parse( xml(1) ), "Parse XML" ); ok( !$feed_bad_name->cache, "Did Not Cache File" ); unlink "/tmp/test_018_debug.sto"; my $feed_title = XML::RSS::Feed->new( name => 'test_018_debug', url => "http://www.jbisbee.com/rsstest", debug => 1, tmpdir => "/tmp", ); isa_ok( $feed_title, "XML::RSS::Feed" ); ok( $feed_title->parse( xml(1) ), "Parsed XML" ); ok( $feed_title->cache, "Successfully Cached File" ); my $feed_no_title = XML::RSS::Feed->new( name => 'test_018_debug', url => "http://www.jbisbee.com/rsstest", debug => 1, tmpdir => "/tmp", ); isa_ok( $feed_no_title, "XML::RSS::Feed" ); } sub build_warn { my @args = @_; return sub { my ($warn) = @_; like( $warn, qr/$_/i, $_ ) for @args }; } sub xml { my ($index) = @_; $index--; return ( qq| http://slashdot.org/ News for nerds, stuff that matters Slashdot http://images.slashdot.org/topics/topicslashdot.gif http://slashdot.org/ States Link Databases to Find Tax Cheats http://slashdot.org/article.pl?sid=04/04/04/2021256 Invulnerable, Waterproof PDA http://slashdot.org/article.pl?sid=04/04/04/1814258 Still More on Open Source Usability http://slashdot.org/article.pl?sid=04/04/04/1811226 Moore's Law Limits Pushed Back Again http://slashdot.org/article.pl?sid=04/04/04/182224 Advanced Mobile Phone Tech in Japan http://slashdot.org/article.pl?sid=04/04/04/1754231 Computerized Time Clocks Susceptible to 'Manager Attack' http://slashdot.org/article.pl?sid=04/04/04/1655231 A Completely Separate Ecosystem on Earth http://slashdot.org/article.pl?sid=04/04/04/1653233 3D, FPS File Manager http://slashdot.org/article.pl?sid=04/04/04/1621251 Searching by Shape... http://slashdot.org/article.pl?sid=04/04/04/1423210 New Wave of Web Ads? http://slashdot.org/article.pl?sid=04/04/04/1410251 Search Slashdot Search Slashdot stories query http://slashdot.org/search.pl |, qq| http://slashdot.org/ News for nerds, stuff that matters Slashdot http://images.slashdot.org/topics/topicslashdot.gif http://slashdot.org/ States Link Databases to Find Tax Cheats Taxing Cheaters http://slashdot.org/article.pl?sid=04/04/04/202125adfad Invulnerable, Waterproof PDA http://slashdot.org/article.pl?sid=04/04/04/1814258 Still More on Open Source Usability http://slashdot.org/article.pl?sid=04/04/04/1811226 Moore's Law Limits Pushed Back Again http://slashdot.org/article.pl?sid=04/04/04/182224 Advanced Mobile Phone Tech in Japan http://slashdot.org/article.pl?sid=04/04/04/1754231 Computerized Time Clocks Susceptible to 'Manager Attack' http://slashdot.org/article.pl?sid=04/04/04/1655231 A Completely Separate Ecosystem on Earth http://slashdot.org/article.pl?sid=04/04/04/1653233 3D, FPS File Manager http://slashdot.org/article.pl?sid=04/04/04/1621251 Searching by Shape... http://slashdot.org/article.pl?sid=04/04/04/1423210 New Wave of Web Ads? http://slashdot.org/article.pl?sid=04/04/04/1410251 Search Slashdot Search Slashdot stories query http://slashdot.org/search.pl | )[$index]; } XML-RSS-Feed-2.212/t/013_legacy.t0000755000175000017500000000421710456772231015553 0ustar jbisbeejbisbee#!/usr/bin/perl use strict; use warnings; use File::Temp qw(tempfile tempdir); use Test::More tests => 3; use_ok("XML::RSS::Feed"); my $dir = tempdir( CLEANUP => 1 ); my $name = 'jbisbee_test'; my $rss = do { local $/, }; open my $fh, ">" . $dir . '/' . $name; print $fh $rss; close $fh; my $feed = XML::RSS::Feed->new( name => 'jbisbee_test', url => "http://www.jbisbee.com/rsstest", tmpdir => $dir, ); isa_ok( $feed, 'XML::RSS::Feed' ); ok( $feed->num_headlines == 10, "making sure legacy caching still works" ); __DATA__ jbisbee.com http://www.jbisbee.com/ Testing XML::RSS::Feed Wednesday 23rd of June 2004 06:21:30 PM http://www.jbisbee.com/xml-rss-feed/test/1088036490 Wednesday 23rd of June 2004 06:21:00 PM http://www.jbisbee.com/xml-rss-feed/test/1088036460 Wednesday 23rd of June 2004 06:20:30 PM http://www.jbisbee.com/xml-rss-feed/test/1088036430 Wednesday 23rd of June 2004 06:20:00 PM http://www.jbisbee.com/xml-rss-feed/test/1088036400 Wednesday 23rd of June 2004 06:19:30 PM http://www.jbisbee.com/xml-rss-feed/test/1088036370 Wednesday 23rd of June 2004 06:19:00 PM http://www.jbisbee.com/xml-rss-feed/test/1088036340 Wednesday 23rd of June 2004 06:18:30 PM http://www.jbisbee.com/xml-rss-feed/test/1088036310 Wednesday 23rd of June 2004 06:18:00 PM http://www.jbisbee.com/xml-rss-feed/test/1088036280 Wednesday 23rd of June 2004 06:17:30 PM http://www.jbisbee.com/xml-rss-feed/test/1088036250 Wednesday 23rd of June 2004 06:17:00 PM http://www.jbisbee.com/xml-rss-feed/test/1088036220 XML-RSS-Feed-2.212/t/005_create_headline.t0000755000175000017500000000417610456772231017410 0ustar jbisbeejbisbee#!/usr/bin/perl use strict; use warnings; use Test::More tests => 216; BEGIN { use_ok('XML::RSS::Feed'); use_ok('XML::RSS::Headline'); } my $feed = XML::RSS::Feed->new( url => "http://www.jbisbee.com/rdf/", name => 'jbisbee', ); isa_ok( $feed, 'XML::RSS::Feed' ); my $headline = XML::RSS::Headline->new( url => "http://www.jbisbee.com/testurl/1", headline => "Test Headline", ); isa_ok( $headline, 'XML::RSS::Headline' ); my $headline_as_id = XML::RSS::Headline->new( url => "http://www.jbisbee.com/testurl/1", headline => "Test Headline\nLine 2", headline_as_id => 1, ); ok( $headline_as_id->headline, "headline_as_id headline" ); ok( !$headline_as_id->item, "making sure method item returns false" ); my $hires_time = Time::HiRes::time(); my $new_time = $hires_time; ok( $headline_as_id->set_first_seen($hires_time), "set_first_seen" ); ok( $headline_as_id->first_seen_hires == $hires_time, "Checking first_seen_hires" ); ok( $headline_as_id->first_seen == int $hires_time, "Checking first_seen" ); ok( $headline_as_id->set_first_seen, "Checking first_seen bool" ); $headline_as_id->timestamp($hires_time); my $timestamp = $headline_as_id->timestamp(); ok( $hires_time == $timestamp, "set/get headline timestamp" ); ok( $headline_as_id->id, "get id when headline_as_id is true" ); my $headline_ref = $headline_as_id->multiline_headline; my @headlines = $headline_as_id->multiline_headline; ok( ref $headline_ref eq "ARRAY", "multiline headline as array ref" ); ok( @headlines == 2, "multiline headline as array" ); isa_ok( $headline, 'XML::RSS::Headline' ); my $iterations = 100; my $title = "This is a test 1"; my $url = "http://www.jbisbee.com/test/url/1"; $feed->pre_process(); for my $i ( 1 .. $iterations ) { $feed->create_headline( headline => ++$title, url => ++$url, ); cmp_ok( $feed->num_headlines, '==', $i, "Verify num_headlines $i" ); cmp_ok( $feed->late_breaking_news, '==', $i, "Verify late_breaking_news $i" ); } $feed->post_process(); cmp_ok( $feed->late_breaking_news, '==', 100, "Verify mark_all_headlines_read" ); XML-RSS-Feed-2.212/t/007_fetch_feed.t0000755000175000017500000003121610456772231016365 0ustar jbisbeejbisbee#!/usr/bin/perl use strict; use warnings; use Test::More tests => 11; BEGIN { use_ok('XML::RSS::Feed'); use_ok('XML::RSS::Headline::PerlJobs'); } my $feed = XML::RSS::Feed->new( name => 'jbisbee_test', url => "http://www.jbisbee.com/rsstest", ); isa_ok( $feed, 'XML::RSS::Feed' ); ok( $feed->parse( xml(1) ), "Failed to parse XML from " . $feed->url ); cmp_ok( $feed->num_headlines, '==', 10, "Verify correct number of headlines" ); cmp_ok( $feed->late_breaking_news, '==', 10, "Verify mark_all_headlines_read" ); ok( $feed->parse( xml(2) ), "parse XML from " . $feed->url ); cmp_ok( $feed->num_headlines, '>=', 11, "Verify correct number of headlines" ); cmp_ok( $feed->late_breaking_news, '>=', 1, "Verify 1 new story" ); my $pj_feed = XML::RSS::Feed->new( name => 'perljobs', url => "http://jobs.perl.org/rss/standard.rss", hlobj => "XML::RSS::Headline::PerlJobs", ); isa_ok( $pj_feed, 'XML::RSS::Feed' ); ok( $pj_feed->parse( xml(3) ), "parse XML from " . $pj_feed->url ); sub xml { my ($index) = @_; $index--; return ( q| jbisbee.com http://www.jbisbee.com/ Testing XML::RSS::Feed Wednesday 03rd of November 2004 08:48:00 PM http://www.jbisbee.com/xml-rss-feed/test/1099540080 Wednesday 03rd of November 2004 08:47:30 PM http://www.jbisbee.com/xml-rss-feed/test/1099540050 Wednesday 03rd of November 2004 08:47:00 PM http://www.jbisbee.com/xml-rss-feed/test/1099540020 Wednesday 03rd of November 2004 08:46:30 PM http://www.jbisbee.com/xml-rss-feed/test/1099539990 Wednesday 03rd of November 2004 08:46:00 PM http://www.jbisbee.com/xml-rss-feed/test/1099539960 Wednesday 03rd of November 2004 08:45:30 PM http://www.jbisbee.com/xml-rss-feed/test/1099539930 Wednesday 03rd of November 2004 08:45:00 PM http://www.jbisbee.com/xml-rss-feed/test/1099539900 Wednesday 03rd of November 2004 08:44:30 PM http://www.jbisbee.com/xml-rss-feed/test/1099539870 Wednesday 03rd of November 2004 08:44:00 PM http://www.jbisbee.com/xml-rss-feed/test/1099539840 Wednesday 03rd of November 2004 08:43:30 PM http://www.jbisbee.com/xml-rss-feed/test/1099539810 |, q| jbisbee.com http://www.jbisbee.com/ Testing XML::RSS::Feed Wednesday 03rd of November 2004 08:48:30 PM http://www.jbisbee.com/xml-rss-feed/test/1099540110 Wednesday 03rd of November 2004 08:48:00 PM http://www.jbisbee.com/xml-rss-feed/test/1099540080 Wednesday 03rd of November 2004 08:47:30 PM http://www.jbisbee.com/xml-rss-feed/test/1099540050 Wednesday 03rd of November 2004 08:47:00 PM http://www.jbisbee.com/xml-rss-feed/test/1099540020 Wednesday 03rd of November 2004 08:46:30 PM http://www.jbisbee.com/xml-rss-feed/test/1099539990 Wednesday 03rd of November 2004 08:46:00 PM http://www.jbisbee.com/xml-rss-feed/test/1099539960 Wednesday 03rd of November 2004 08:45:30 PM http://www.jbisbee.com/xml-rss-feed/test/1099539930 Wednesday 03rd of November 2004 08:45:00 PM http://www.jbisbee.com/xml-rss-feed/test/1099539900 Wednesday 03rd of November 2004 08:44:30 PM http://www.jbisbee.com/xml-rss-feed/test/1099539870 Wednesday 03rd of November 2004 08:44:00 PM http://www.jbisbee.com/xml-rss-feed/test/1099539840 |, q| jobs.perl.org http://jobs.perl.org/ The Perl Jobs site en-us Copyright 2001, jobs.perl.org 2004-11-03T19:53:09Z ask@perl.org ask@perl.org Perl Jobs daily 8 1901-01-01T00:00+00:00 Sr Perl Database Developer with Perl, Unix and Oracle; not a DBA http://jobs.perl.org/job/1694 eQuest Solutions - CA, Pasadena (2004-11-03) Full time CA, Pasadena eQuest Solutions Salaried employee 2004-11-03 Perl/mod_perl/mysql/apache developer http://jobs.perl.org/job/1944 Coreware Ltd - United Kingdom, Surrey, Guildford (2004-11-03) Full time United Kingdom, Surrey, Guildford Coreware Ltd Salaried employee 2004-11-03 Sr Perl Developer of Reporting/BI systems http://jobs.perl.org/job/1943 eQuest Solutions - United States, CA, West LA (2004-11-02) Full time United States, CA, West LA eQuest Solutions Salaried employee 2004-11-02 Mid-senior level Perl/Mod_Perl Programmer http://jobs.perl.org/job/1942 Links Technology Solutions, Inc. - United States, Arizona, Scottsdale (2004-11-02) Full time United States, Arizona, Scottsdale Links Technology Solutions, Inc. Hourly employee 2004-11-02 Senior Perl Developer http://jobs.perl.org/job/1941 Performics, Inc. - United States, IL, Chicago (2004-11-02) Full time United States, IL, Chicago Performics, Inc. Salaried employee 2004-11-02 Software Engineer http://jobs.perl.org/job/1940 Where2GetIt, Inc. - United States, Illinois, Wheeling (2004-11-02) Full time United States, Illinois, Wheeling Where2GetIt, Inc. Salaried employee 2004-11-02 Perl/CGI/Apache/FTP Programmer http://jobs.perl.org/job/1939 AAA Microcomputer Service - United States, CA, Long Beach (2004-11-01) Flexible United States, CA, Long Beach AAA Microcomputer Service Independent contractor (project-based) 2004-11-01 Super-sweet hackers looking to make the world a better place http://jobs.perl.org/job/1938 athenahealth - United States, MA, Boston (Waltham) (2004-11-01) Full time United States, MA, Boston (Waltham) athenahealth Salaried employee 2004-11-01 Perl/CGI/DBI/MySQL/Apache/modperl Programmer for Intnl Software Company http://jobs.perl.org/job/1937 CyberSurfers Inc. / Annuk Inc. - India, Punjab, Haryana, Delhi, Chandigarh (2004-11-01) Full time India, Punjab, Haryana, Delhi, Chandigarh CyberSurfers Inc. / Annuk Inc. Salaried employee 2004-11-01 Need CSS look & feel, UI overhaul for Perl/Mason site http://jobs.perl.org/job/1935 Prop erty Res earch Part ners LLC - United States, NY, New York City (2004-10-30) Full time United States, NY, New York City Prop erty Res earch Part ners LLC Independent contractor (hourly) 2004-10-30 Sysadmin/Syscoder Dream Job -- Purely Remote http://jobs.perl.org/job/1934 Telerama - United States, PA, Pittsburgh (2004-10-29) Full time United States, PA, Pittsburgh Telerama Salaried employee 2004-10-29 WEB DEVELOPER/PROGRAMMER NEEDED http://jobs.perl.org/job/1849 eSiteGuru.com - United States, CA, Roseville (2004-10-28) Full time United States, CA, Roseville eSiteGuru.com Salaried employee 2004-10-28 | )[$index]; } XML-RSS-Feed-2.212/t/011_pod.t0000755000175000017500000000043710456772231015067 0ustar jbisbeejbisbee#!/usr/bin/perl use strict; use warnings; use Test::More; BEGIN { eval { require Test::Pod; }; my $test_pod = $@ ? 0 : 1; sub TEST_POD {$test_pod} } if (TEST_POD) { eval { Test::Pod::all_pod_files_ok() }; } else { plan skip_all => "Test::Pod::Coverage required"; } XML-RSS-Feed-2.212/t/009_max_headlines.t0000755000175000017500000000222410456772231017111 0ustar jbisbeejbisbee#!/usr/bin/perl use strict; use warnings; use Test::More tests => 105; BEGIN { use_ok('XML::RSS::Feed') } my $max_headlines = 5; my $iterations = 100; my $title = "This is a test 1"; my $url = "http://www.jbisbee.com/test/url/1"; cmp_ok( $max_headlines, "<", $iterations, "Max headlines must be less than iterations" ); my $feed = XML::RSS::Feed->new( url => "http://www.jbisbee.com/rdf/", name => 'jbisbee', max_headlines => $max_headlines, ); isa_ok( $feed, 'XML::RSS::Feed' ); $feed->pre_process(); my @headlines = (); for my $i ( 1 .. $iterations ) { my %hash = ( headline => ++$title, url => ++$url, ); unshift @headlines, $hash{headline}; $feed->create_headline(%hash); cmp_ok( $feed->num_headlines, '<=', $max_headlines, "Verify max_headlines $i" ); } $feed->post_process(); cmp_ok( $feed->num_headlines, '==', $max_headlines, "Verify max_headlines" ); @headlines = splice( @headlines, 0, $max_headlines ); my @headlines2 = map { $_->headline } $feed->headlines; ok( eq_array( \@headlines, \@headlines2 ), "Comparing before and after headlines" ); XML-RSS-Feed-2.212/Changes0000644000175000017500000002447710523620146014566 0ustar jbisbeejbisbeeRevision history for Perl module XML::RSS::Feed / XML::RSS::Headline 2.212 11/06/2006 - fix META.yml generation by upgrading to ExtUtils::MakeMaker 6.31 - add examples directory with an example (part deux) 2.211 11/05/2006 - fix META.yml generation by upgrading to ExtUtils::MakeMaker 6.31 - add examples directory with an example 2.21 11/01/2006 - make cpants compatible with updated META.yml - fix broken tests pointing to old jbisbee.com/rsstest 2.2 - ran code through perltidy - switched to perl best practices pod template 2.1 - Added $self->{process_count} so that the first time we process a feed, we won't mark all headlines as read if this is the first time we processed the feed OR if we're pulling up cached headlines. (This fixes RT bug #12682) Thanks to James Armstrong for reporting it. - Also updated a bunch of tests so they passed because of this bug fix. 2.04 - Just added a use Perl; journals sub class example XML::RSS::Headline::UsePerlJournals, which 2.03 - Needed to use URI::Escape qw(uri_unescape) on XML::RSS::Headline::Fark URLs. - fixed the t/019_fark.t test to match correctly decoded URL - simple change of use vars qw($VERSION); to our $VERSION in XML::RSS::Headline::PerlJobs and XML::RSS::Headline::Fark 2.02 - Fixed decode_entities to actually work (added tests to verify) - added XML::RSS::Headline::Fark subclass - added tests for XML::RSS::Headline::Fark subclass - fixed typos in the pod for XML::RSS::Headline::PerlJobs - fixed pod formating of methods and attributes (C<> looked like crap on search.cpan.org) - caught and tested warnings issued by 008_store_retrieve 2.01 - Fixed the 011_test_pod and 012_test_pod_coverage tests to correctly detect if the relative Test::Pod and Test::Pod::Coverage modules are installed (Thanks to Randal Schwartz for taking the time to shoot me an e-mail and pointing it out) :) 2.0 - The biggest change in in the tests. This distrobution is now at 100% coverage! I found serveral major issues just by painstakingly making sure that each bit was tested. While I don't think that 100% is always nessesary, it just feels really good to see all o green 100%'s on that coverage report. - Added encode_utf8 before md5_base64 so watching uniqueness via headline_as_id works with uft8 headlines (thanks hachi!) - You can now create XML::RSS::Headline objects with just a url and description. It seems that you can have an RSS item without a title and the title is build from a substr of the description. - added XML::RSS::Headline::PerlJobs example of subclassing XML::RSS::Headline - Now if caching is turned on, it caches after every parse rather than on DESTROY - now traps a bad 'store' attempt and issues a warn. I had an if statement and for got I needed to try/catch with eval when using Storable. - now decodes HTML entities in XML::RSS::Headline - Lots of documentation updates and clarifications, and formatting changes. 1.1 - Change the description in the modules name - Added HTML::Entities decode on headlines (wonder why XML::RSS doesn't do it) - cleaned up pod - Beefed up the tests using Devel::Coverage - Added sample subclass of XML::RSS::Headline (XML::RSS::Headline::PerlJobs) was in documentation and just added it to the distrobution. 1.05 - Fixed caching issue. Now cache in post process after every fetch instead of on object destroy (which was broken) :( - Did "pod2text XML/RSS/Feed.pm > README" 1.04 - updated my e-mail address to jbisbee@cpan.org - stupid regression, the order of the headline array was reversed from version 0.25 to 1.00 and has been fixed in 1.04. This is a seriously regression so make sure you don't use releases 1.00-1.03. (I wrote tests for the module AFTER I had the order reversed, had I written the tests first, the whole bug would have been avoided. I'm now a test driven development 1.03 - added failed_to_fetch and failed_to_parse back as deprecated methods that return false and issue a warn statement if they're used - added a test to make sure that the methods stay and they return false 1.02 - changed C<> to B<> because pod looks crap on search.cpan.org 1.01 - fixed pod error for $feed->parse() 1.00 - Broke down and learned how to write tests then wrote a bunch to make future development and bug fixes fun instead of painful. (and kicked myself for not doing it sooner) - Holy crap that is pod documention for every public method for both XML::RSS::Feed and XML::RSS::Headline - XML::RSS::Headlines have a new attribute 'description' - Caching is now done using storables rather than using the XML. With headlines the title, url, description, and first_seen timestamp are cached, and with feeds, the channel title, url, and last_updated are cached. - New timestamps on feeds and headlines. The ones on feeds are set everytime the feed is updated and the ones on headlines are only set when the headline is first seen. - Previously the headline limit was set by the RSS feed now you can as many headlines as you have memory. You can set a limit by setting the new attribute max_headlines - added new methods to support not using XML::RSS to parse feeds you can use the module 4 ways now 1. $feed->parse($xml_string); 2. $feed->process($items_array_ref,$feed_title,$feed_link); 3. $feed->pre_process; $feed->process_items($items_array_ref); $feed->post_process; 4. $feed->pre_process; $feed->create_headline( 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 - added Clone 0.13 dependency - upped version to 0.25 0.20 - added new param 'tmpdir'. The module will now attempt to load cached XML when this param is given. The XML is held in memory until the DESTROY method is called and the XML is written to the tmpdir if it is defined. - better debugging if 'debug' is defined. 0.11 - issue with Module::Release 0.10 - moved XML::RSS::Feed::Headline into XML::RSS::Feed as XML::RSS::Headline - fixed a return code error on parse - was returning 0 on parse and should returning 1 (this didn't really affect anything though) - added a 'hlobj' attribute so that you can subclass XML::RSS::Headline to customize a headline. An example of this is subclassing XML::RSS::Headline to create a new headline method that takes advantage of the extra info found with in the xml block 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. + Part Time Perl Brian Koontz - United States, TX, Dallas Part time, Independent contractor (project-based) http://jobs.perl.org/job/950 - removed _build_headline 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 - original version XML-RSS-Feed-2.212/lib/0000755000175000017500000000000010523620301014014 5ustar jbisbeejbisbeeXML-RSS-Feed-2.212/lib/XML/0000755000175000017500000000000010523620301014454 5ustar jbisbeejbisbeeXML-RSS-Feed-2.212/lib/XML/RSS/0000755000175000017500000000000010523620301015123 5ustar jbisbeejbisbeeXML-RSS-Feed-2.212/lib/XML/RSS/Headline/0000755000175000017500000000000010523620301016634 5ustar jbisbeejbisbeeXML-RSS-Feed-2.212/lib/XML/RSS/Headline/Fark.pm0000644000175000017500000000617510456772231020105 0ustar jbisbeejbisbeepackage XML::RSS::Headline::Fark; use strict; use warnings; use base qw(XML::RSS::Headline); use URI::Escape qw(uri_unescape); =head1 NAME XML::RSS::Headline::Fark - XML::RSS::Headline Example Subclass =head1 VERSION 2.2 =cut our $VERSION = 2.2; =head1 SYNOPSIS Strip out the extra Fark redirect URL and strip out the various [blahblah] blocks in the headline use XML::RSS::Feed; use XML::RSS::Headline::Fark; use LWP::Simple qw(get); my $feed = XML::RSS::Feed->new( name => "fark", url => "http://www.pluck.com/rss/fark.rss", hlobj => "XML::RSS::Headline::Fark", ); while (1) { $feed->parse(get($feed->url)); print $_->headline . "\n" for $feed->late_breaking_news; sleep($feed->delay); } Here is the before output in #news on irc.perl.org - [Sad] Elizabeth Edwards diagnosed with breast cancer http://go.fark.com/cgi/fark/go.pl?IDLink=1200026&location=http://www.msnbc.msn.com/id/6408022 and here is the updated output - Elizabeth Edwards diagnosed with breast cancer http://www.msnbc.msn.com/id/6408022 =head1 MUTAITED METHOD =over 4 =item B<< $headline->item( $item ) >> Init the object for a parsed RSS item returned by L. =back =cut sub item { my ( $self, $item ) = @_; $self->SUPER::item($item); # set url and description my $headline = $self->headline; $headline =~ s/\[.+?\]\s+//; $self->headline($headline); my $url = $self->url; my $stripit = qr/ http\:\/\/ go\.fark\.com\/ cgi\/fark\/go\.pl\? IDLink\=\d+\& location\= /x; $url =~ s/$stripit//; $self->url( uri_unescape($url) ); } =head1 AUTHOR Jeff Bisbee, C<< >> =head1 BUGS Please report any bugs or feature requests to C, or through the web interface at L. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. =head1 SUPPORT You can find documentation for this module with the perldoc command. perldoc XML::RSS::Headline::Fark You can also look for information at: =over 4 =item * AnnoCPAN: Annotated CPAN documentation L =item * CPAN Ratings L =item * RT: CPAN's request tracker L =item * Search CPAN L =back =head1 ACKNOWLEDGEMENTS Special thanks to Rocco Caputo, Martijn van Beers, Sean Burke, Prakash Kailasa and Randal Schwartz for their help, guidance, patience, and bug reports. Guys thanks for actually taking time to use the code and give good, honest feedback. =head1 COPYRIGHT & LICENSE Copyright 2006 Jeff Bisbee, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 SEE ALSO L, L, L, L, L =cut 1; XML-RSS-Feed-2.212/lib/XML/RSS/Headline/UsePerlJournals.pm0000644000175000017500000000623710456772231022316 0ustar jbisbeejbisbeepackage XML::RSS::Headline::UsePerlJournals; use strict; use warnings; use base qw(XML::RSS::Headline); =head1 NAME XML::RSS::Headline::UsePerlJournals - XML::RSS::Headline Example Subclass =head1 VERSION 2.2 =cut our $VERSION = 2.2; =head1 SYNOPSIS You can also subclass XML::RSS::Headline to tweak the rss content to your liking. In this example. I change the headline to remove the date/time and add the Use Perl Journal author's ID. Also in this use Perl; rss feed you get the actual link to the journal entry, rather than the link just to the user's journal. (meaning that the journal URLs contain the entry's ID) use XML::RSS::Feed; use XML::RSS::Headline::UsePerlJournals; use LWP::Simple qw(get); my $feed = XML::RSS::Feed->new( name => "useperljournals", hlobj => "XML::RSS::Headline::UsePerlJournals", delay => 60, url => "http://use.perl.org/search.pl?tid=&query=&" . "author=&op=journals&content_type=rss", ); while (1) { $feed->parse(get($feed->url)); print $_->headline . "\n" for $feed->late_breaking_news; sleep($feed->delay); } Here is the output from rssbot on irc.perl.org in channel #news (which uses these modules) + [pudge] New Cool Journal RSS Feeds at use Perl; http://use.perl.org/~pudge/journal/21884 =head1 MUTAITED METHOD =head2 $headline->item( $item ) Init the object for a parsed RSS item returned by L. =cut sub item { my ( $self, $item ) = @_; $self->SUPER::item($item); # set url and description my $headline = $self->headline; my $url = $self->url; my ($id) = $url =~ /\/\~(.+?)\//; $headline =~ s/\s+\(.+\)\s*$//; $self->headline("[$id] $headline"); } =head1 AUTHOR Jeff Bisbee, C<< >> =head1 BUGS Please report any bugs or feature requests to C, or through the web interface at L. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. =head1 SUPPORT You can find documentation for this module with the perldoc command. perldoc XML::RSS::Headline::UsePerlJournals You can also look for information at: =over 4 =item * AnnoCPAN: Annotated CPAN documentation L =item * CPAN Ratings L =item * RT: CPAN's request tracker L =item * Search CPAN L =back =head1 ACKNOWLEDGEMENTS Special thanks to Rocco Caputo, Martijn van Beers, Sean Burke, Prakash Kailasa and Randal Schwartz for their help, guidance, patience, and bug reports. Guys thanks for actually taking time to use the code and give good, honest feedback. =head1 COPYRIGHT & LICENSE Copyright 2006 Jeff Bisbee, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 SEE ALSO L, L, L, L, L =cut 1; XML-RSS-Feed-2.212/lib/XML/RSS/Headline/PerlJobs.pm0000644000175000017500000000640510456772231020736 0ustar jbisbeejbisbeepackage XML::RSS::Headline::PerlJobs; use strict; use warnings; use base qw(XML::RSS::Headline); =head1 NAME XML::RSS::Headline::PerlJobs - XML::RSS::Headline Example Subclass =head1 VERSION 2.2 =cut our $VERSION = 2.2; =head1 SYNOPSIS You can also subclass XML::RSS::Headline to provide a 'multiline' RSS headline based on additional information inside the RSS Feed. Here is an example for the Perl Jobs (jobs.perl.org) RSS feed by simply passing in the C class name. use XML::RSS::Feed; use XML::RSS::Headline::PerlJobs; use LWP::Simple qw(get); my $feed = XML::RSS::Feed->new( name => "perljobs", url => "http://jobs.perl.org/rss/standard.rss", hlobj => "XML::RSS::Headline::PerlJobs", ); while (1) { $feed->parse(get($feed->url)); print $_->headline . "\n" for $feed->late_breaking_news; sleep($feed->delay); } Here is the output from rssbot on irc.perl.org in channel #news (which uses these modules) + Part Time Perl Brian Koontz - United States, TX, Dallas Part time, Independent contractor (project-based) http://jobs.perl.org/job/950 =head1 MUTAITED METHOD =head2 $headline->item( $item ) Init the object for a parsed RSS item returned by L. =cut sub item { my ($self,$item) = @_; $self->SUPER::item($item); # set url and description my $key = 'http://jobs.perl.org/rss/'; my $name = $item->{$key}{company_name} || ""; my $location = $item->{$key}{location} || "Unknown Location"; my $hours = $item->{$key}{hours} || "Unknown Hours"; my $terms = $item->{$key}{employment_terms} || "Unknown Terms"; my $name_location = $name ? $name . " - " . $location : $location; $self->headline("$item->{title}\n$name_location\n$hours, $terms"); } =head1 AUTHOR Jeff Bisbee, C<< >> =head1 BUGS Please report any bugs or feature requests to C, or through the web interface at L. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. =head1 SUPPORT You can find documentation for this module with the perldoc command. perldoc XML::RSS::Headline::PerlJobs You can also look for information at: =over 4 =item * AnnoCPAN: Annotated CPAN documentation L =item * CPAN Ratings L =item * RT: CPAN's request tracker L =item * Search CPAN L =back =head1 ACKNOWLEDGEMENTS Special thanks to Rocco Caputo, Martijn van Beers, Sean Burke, Prakash Kailasa and Randal Schwartz for their help, guidance, patience, and bug reports. Guys thanks for actually taking time to use the code and give good, honest feedback. =head1 COPYRIGHT & LICENSE Copyright 2006 Jeff Bisbee, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 SEE ALSO L, L, L, L, L =cut 1; XML-RSS-Feed-2.212/lib/XML/RSS/Headline.pm0000644000175000017500000002064710456772231017222 0ustar jbisbeejbisbeepackage XML::RSS::Headline; use strict; use warnings; use Digest::MD5 qw(md5_base64); use Encode qw(encode_utf8); use URI; use Time::HiRes; use HTML::Entities; # length of headline when from description use constant DESCRIPTION_HEADLINE => 45; =head1 NAME XML::RSS::Headline - Persistant XML RSS Encapsulation =head1 VERSION 2.2 =cut our $VERSION = 2.2; =head1 SYNOPSIS Headline object to encapsulate the headline/URL combination of a RSS feed. It provides a unique id either by way of the URL or by doing an MD5 checksum on the headline (when URL uniqueness fails). =head1 CONSTRUCTOR =head2 XML::RSS::Headline->new( headline =E $headline, url =E $url ) =head2 XML::RSS::Headline->new( item =E $item ) A XML::RSS::Headline object can be initialized either with headline/url or with a parse XML::RSS item structure. The argument 'headline_as_id' is optional and takes a boolean as its value. =cut sub new { my $class = shift @_; my $self = bless {}, $class; my %args = @_; my $first_seen = $args{first_seen}; my $headline_as_id = $args{headline_as_id} || 0; delete $args{first_seen} if exists $args{first_seen}; delete $args{headline_as_id} if exists $args{headline_as_id}; if ( $args{item} ) { unless ( ( $args{item}->{title} || $args{item}->{description} ) && $args{item}->{link} ) { warn "item must contain either title/link or description/link"; return; } } else { unless ( $args{url} && ( $args{headline} || $args{description} ) ) { warn 'Either item, url/headline. or url/description are required'; return; } } $self->headline_as_id($headline_as_id); for my $method ( keys %args ) { if ( $self->can($method) ) { $self->$method( $args{$method} ); } else { warn "Invalid argument: '$method'"; } } unless ( $self->headline ) { warn "Failed to set headline"; return; } $self->set_first_seen($first_seen); return $self; } =head1 METHODS =head2 $headline->id The id is our unique identifier for a headline/url combination. Its how we can keep track of which headlines we have seen before and which ones are new. The id is either the URL or a MD5 checksum generated from the headline text (if B<$headline-Eheadline_as_id> is true); =cut sub id { my ($self) = shift @_; return $self->{_rss_headline_id} if $self->headline_as_id; return $self->url; } sub _cache_id { my ($self) = @_; $self->{_rss_headline_id} = md5_base64( encode_utf8( $self->{safe_headline} ) ) if $self->{safe_headline}; } =head2 $headline->multiline_headline This method returns the headline as either an array or array reference based on context. It splits headline on newline characters into the array. =cut sub multiline_headline { my ($self) = @_; my @multiline_headline = split /\n/, $self->headline; return wantarray ? @multiline_headline : \@multiline_headline; } =head2 $headline->item( $item ) Init the object for a parsed RSS item returned by L. =cut sub item { my ( $self, $item ) = @_; return unless $item; $self->url( $item->{link} ); $self->headline( $item->{title} ); $self->description( $item->{description} ); } =head2 $headline->set_first_seen =head2 $headline->set_first_seen( Time::HiRes::time() ) Set the time of when the headline was first seen. If you pass in a value it will be used otherwise calls Time::HiRes::time(). =cut sub set_first_seen { my ( $self, $hires_time ) = @_; $self->{hires_timestamp} = $hires_time; $self->{hires_timestamp} = Time::HiRes::time() unless $hires_time; return 1; } =head2 $headline->first_seen The time (in epoch seconds) of when the headline was first seen. =cut sub first_seen { my ($self) = @_; return int $self->{hires_timestamp}; } =head2 $headline->first_seen_hires The time (in epoch seconds and milliseconds) of when the headline was first seen. =cut sub first_seen_hires { my ($self) = @_; return $self->{hires_timestamp}; } =head1 GET/SET ACCESSOR METHODS =head2 $headline->headline =head2 $headline->headline( $headline ) The rss headline/title. HTML::Entities::decode_entities is used when the headline is set. (not sure why XML::RSS doesn't do this) =cut sub headline { my ( $self, $headline ) = @_; if ($headline) { $self->{headline} = decode_entities $headline; if ( $self->{headline_as_id} ) { $self->{safe_headline} = $headline; $self->_cache_id; } } return $self->{headline}; } =head2 $headline->url =head2 $headline->url( $url ) The rss link/url. URI->canonical is called to attempt to normalize the URL =cut sub url { my ( $self, $url ) = @_; # clean the URL up a bit $self->{url} = URI->new($url)->canonical if $url; return $self->{url}; } =head2 $headline-Edescription =head2 $headline-Edescription( $description ) The description of the RSS headline. =cut sub description { my ( $self, $description ) = @_; if ($description) { $self->{description} = decode_entities $description; $self->_description_headline unless $self->headline; } return $self->{description}; } sub _description_headline { my ($self) = @_; my $punctuation = qr/[\.\,\?\!\:\;]+/s; my $description = $self->{description}; $description =~ s/
/\n/g; # turn br into newline $description =~ s/<.+?>/ /g; my $headline = ( split $punctuation, $description )[0] || ""; $headline =~ s/^\s+//; $headline =~ s/\s+$//; my $build_headline = ""; for my $word ( split /\s+/, $headline ) { $build_headline .= " " if $build_headline; $build_headline .= $word; last if length $build_headline > DESCRIPTION_HEADLINE; } return unless $build_headline; $self->headline( $build_headline .= '...' ); } =head2 $headline->headline_as_id =head2 $headline->headline_as_id( $bool ) A bool value that determines whether the URL will be the unique identifier or the if an MD5 checksum of the RSS title will be used instead. (when the URL doesn't provide absolute uniqueness or changes within the RSS feed) This is used in extreme cases when URLs aren't always unique to new healines (Use Perl Journals) and when URLs change within a RSS feed (www.debianplanet.org / debianplanet.org / search.cpan.org,search.cpan.org:80) =cut sub headline_as_id { my ( $self, $bool ) = @_; if ( defined $bool ) { $self->{headline_as_id} = $bool; $self->_cache_id; } $self->{headline_as_id}; } =head2 $headline->timestamp =head2 $headline->timestamp( Time::HiRes::time() ) A high resolution timestamp that is set using Time::HiRes::time() when the object is created. =cut sub timestamp { my ( $self, $timestamp ) = @_; $self->{timestamp} = $timestamp if $timestamp; return $self->{timestamp}; } =head1 AUTHOR Jeff Bisbee, C<< >> =head1 BUGS Please report any bugs or feature requests to C, or through the web interface at L. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. =head1 SUPPORT You can find documentation for this module with the perldoc command. perldoc XML::RSS::Headline You can also look for information at: =over 4 =item * AnnoCPAN: Annotated CPAN documentation L =item * CPAN Ratings L =item * RT: CPAN's request tracker L =item * Search CPAN L =back =head1 ACKNOWLEDGEMENTS Special thanks to Rocco Caputo, Martijn van Beers, Sean Burke, Prakash Kailasa and Randal Schwartz for their help, guidance, patience, and bug reports. Guys thanks for actually taking time to use the code and give good, honest feedback. =head1 COPYRIGHT & LICENSE Copyright 2006 Jeff Bisbee, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 SEE ALSO L, L, L, L, L =cut 1; XML-RSS-Feed-2.212/lib/XML/RSS/Feed.pm0000644000175000017500000003601510523620063016336 0ustar jbisbeejbisbeepackage XML::RSS::Feed; use strict; use warnings; use XML::RSS; use XML::RSS::Headline; use Time::HiRes; use Storable qw(store retrieve); =head1 NAME XML::RSS::Feed - Persistant XML RSS Encapsulation =head1 VERSION 2.212 =cut our $VERSION = 2.212; =head1 SYNOPSIS A quick and dirty non-POE example that uses a blocking B. The magic is in the B method that returns only headlines it hasn't seen. use XML::RSS::Feed; use LWP::Simple qw(get); my $feed = XML::RSS::Feed->new( url => "http://www.jbisbee.com/rdf/", name => "jbisbee", delay => 10, debug => 1, tmpdir => "/tmp", # optional caching ); while (1) { $feed->parse(get($feed->url)); print $_->headline . "\n" for $feed->late_breaking_news; sleep($feed->delay); } ATTENTION! - If you want a non-blocking way to watch multiple RSS sources with one process use L. =head1 CONSTRUCTOR =head2 XML::RSS::Feed->new( url => $url, name => $name ) =over 4 =item B =over 4 =item * B Identifier and hash lookup key for the RSS feed. =item * B The URL of the RSS feed =back =item B =over 4 =item * B Number of seconds between updates (defaults to 600) =item * B Directory to keep a cached feed (using Storable) to keep persistance between instances. =item * B Turn debuging on. =item * B Boolean value to use the headline as the id when URL isn't unique within a feed. =item * B A class name sublcassed from L =item * B The max number of headlines to keep. (default is unlimited) =back =back =cut sub new { my $class = shift; my $self = bless { process_count => 0, rss_headlines => [], rss_headline_ids => {}, max_headlines => 0, }, $class; my %args = @_; foreach my $method ( keys %args ) { if ( $self->can($method) ) { $self->$method( $args{$method} ); } else { warn "Invalid argument '$method'"; } } $self->_load_cached_headlines if $self->{tmpdir}; $self->delay(3600) unless $self->delay; return $self; } sub _load_cached_headlines { my ($self) = @_; my $filename_sto = $self->{tmpdir} . '/' . $self->name . '.sto'; my $filename_xml = $self->{tmpdir} . '/' . $self->name; if ( -s $filename_sto ) { my $cached = retrieve($filename_sto); my $title = $self->title || $cached->{title} || ""; $self->set_last_updated( $cached->{last_updated} ); $self->{process_count}++; $self->process( $cached->{items}, $title, $cached->{link} ); warn "[$self->{name}] Loaded Cached RSS Storable\n" if $self->{debug}; } elsif ( -T $filename_xml ) { # legacy XML caching open( my $fh, $filename_xml ); my $xml = do { local $/, <$fh> }; close $fh; warn "[$self->{name}] Loaded Cached RSS XML\n" if $self->{debug}; $self->{process_count}++; $self->parse($xml); } else { warn "[$self->{name}] No Cache File Found\n" if $self->{debug}; } } sub _strip_whitespace { my ($string) = @_; $string =~ s/^\s+//; $string =~ s/\s+$//; return $string; } sub _mark_all_headlines_seen { my ($self) = @_; return unless $self->{process_count}; $self->{rss_headline_ids}{ $_->id } = 1 for $self->late_breaking_news; } =head1 METHODS =head2 $feed->parse( $xml_string ) Pass in a xml string to parse with XML::RSS and then call process to process the results. =cut sub parse { my ( $self, $xml ) = @_; my $rss = XML::RSS->new(); eval { $rss->parse($xml) }; if ($@) { warn "[$self->{name}] [!!] Failed to parse RSS XML: $@\n"; return 0; } else { warn "[$self->{name}] Parsed RSS XML\n" if $self->{debug}; my $items = [ map { { item => $_ } } @{ $rss->{items} } ]; $self->process( $items, ( $self->title || $rss->{channel}{title} ), $rss->{channel}{link} ); return 1; } } =head2 $feed->process( $items, $title, $link ) =head2 $feed->process( $items, $title ) =head2 $feed->process( $items ) Calls B, B, B, B, and B<link> methods to process the parsed results of an RSS XML feed. =over 4 =item * B<$items> An array of hash refs which will eventually become L<XML::RSS::Headline> objects. Look at XML::RSS::Headline->new() for acceptable arguments. =item * B<$title> The title of the RSS feed. =item * B<$link> The RSS channel link (normally a URL back to the homepage) of the RSS feed. =back =cut sub process { my ( $self, $items, $title, $link ) = @_; if ($items) { $self->pre_process; $self->process_items($items); $self->title($title) if $title; $self->link($link) if $link; $self->post_process; return 1; } return 0; } =head2 $feed->pre_process Mark all headlines from previous run as seen. =cut sub pre_process { my ($self) = @_; $self->_mark_all_headlines_seen; } =head2 $feed->process_items( $items ) Turn an array refs of hash refs into L<XML::RSS::Headline> objects and added to the internal list of headlines. =cut sub process_items { my ( $self, $items ) = @_; if ($items) { # used 'reverse' so order seen is preserved for my $item ( reverse @$items ) { $self->create_headline(%$item); } return 1; } return 0; } =head2 $feed->post_process Post process cleanup, cache headlines (if tmpdir), and debug messages. =cut sub post_process { my ($self) = @_; if ( $self->init ) { warn "[$self->{name}] " . $self->late_breaking_news . " New Headlines Found\n" if $self->{debug}; } else { $self->_mark_all_headlines_seen; $self->init(1); warn "[$self->{name}] " . $self->num_headlines . " Headlines Initialized\n" if $self->{debug}; } $self->{process_count}++; $self->cache; $self->set_last_updated; } =head2 $feed->create_headline( %args) Create a new L<XML::RSS::Headline> object and add it to the interal list. Check B<< XML::RSS::Headline->new() >> for acceptable values for B<< %args >>. =cut sub create_headline { my ( $self, %args ) = @_; my $hlobj = $self->{hlobj} || "XML::RSS::Headline"; $args{headline_as_id} = $self->{headline_as_id}; my $headline = $hlobj->new(%args); return unless $headline; unshift( @{ $self->{rss_headlines} }, $headline ) unless $self->seen_headline( $headline->id ); # remove the oldest if the new headline put us over the max_headlines limit if ( $self->max_headlines ) { while ( $self->num_headlines > $self->max_headlines ) { my $garbage = pop @{ $self->{rss_headlines} }; # just in case max_headlines < number of headlines in the feed $self->{rss_headline_ids}{ $garbage->id } = 1; warn "[$self->{name}] Exceeded maximum headlines, removing " . "oldest headline\n" if $self->{debug}; } } } =head2 $feed->num_headlines Returns the number of headlines for the feed. =cut sub num_headlines { my ($self) = @_; return scalar @{ $self->{rss_headlines} }; } =head2 $feed->seen_headline( $id ) Just a boolean test to see if we've seen a headline or not. =cut sub seen_headline { my ( $self, $id ) = @_; return 1 if exists $self->{rss_headline_ids}{$id}; return 0; } =head2 $feed->headlines Returns an array or array reference (based on context) of L<XML::RSS::Headline> objects =cut sub headlines { my ($self) = @_; return wantarray ? @{ $self->{rss_headlines} } : $self->{rss_headlines}; } =head2 $feed->late_breaking_news Returns an array or the number of elements (based on context) of the B<latest> L<XML::RSS::Headline> objects. =cut sub late_breaking_news { my ($self) = @_; my @list = grep { !$self->seen_headline( $_->id ); } @{ $self->{rss_headlines} }; return wantarray ? @list : scalar @list; } =head2 $feed->cache If tmpdir is defined the rss info is cached. =cut sub cache { my ($self) = @_; return unless $self->tmpdir; if ( -d $self->tmpdir && $self->num_headlines ) { my $tmp_filename = $self->tmpdir . '/' . $self->{name} . ".sto"; eval { store( $self->_build_dump_structure, $tmp_filename ) }; if ($@) { warn "[$self->{name}] Could not cache RSS XML to $tmp_filename\n"; return; } else { warn "[$self->{name}] Cached RSS Storable to $tmp_filename\n" if $self->{debug}; return 1; } } return; } sub _build_dump_structure { my ($self) = @_; my $cached = {}; $cached->{title} = $self->title; $cached->{link} = $self->link; $cached->{last_updated} = $self->{timestamp_hires}; $cached->{items} = []; for my $headline ( $self->headlines ) { push @{ $cached->{items} }, { headline => $headline->headline, url => $headline->url, description => $headline->description, first_seen => $headline->first_seen_hires, }; } return $cached; } =head2 $feed->set_last_updated =head2 $feed->set_last_updated( Time::HiRes::time ) Set the time of when the feed was last processed. If you pass in a value it will be used otherwise calls Time::HiRes::time. =cut sub set_last_updated { my ( $self, $hires_time ) = @_; $self->{hires_timestamp} = $hires_time if $hires_time; $self->{hires_timestamp} = Time::HiRes::time() unless $self->{hires_timestamp}; } =head2 $feed->last_updated The time (in epoch seconds) of when the feed was last processed. =cut sub last_updated { my ($self) = @_; return int $self->{hires_timestamp}; } =head2 $feed->last_updated_hires The time (in epoch seconds and milliseconds) of when the feed was last processed. =cut sub last_updated_hires { my ($self) = @_; return $self->{hires_timestamp}; } =head1 SET/GET ACCESSOR METHODS =head2 $feed->title =head2 $feed->title( $title ) The title of the RSS feed. =cut sub title { my ( $self, $title ) = @_; if ($title) { $title = _strip_whitespace($title); $self->{title} = $title if $title; } $self->{title}; } =head2 $feed->debug =head2 $feed->debug( $bool ) Turn on debugging messages =cut sub debug { my $self = shift @_; $self->{debug} = shift if @_; $self->{debug}; } =head2 $feed->init =head2 $feed->init( $bool ) init is used so that we just load the current headlines and don't return all headlines. in other words we initialize them. Takes a boolean argument. =cut sub init { my $self = shift @_; $self->{init} = shift if @_; $self->{init}; } =head2 $feed->name =head2 $feed->name( $name ) The identifier of an RSS feed. =cut sub name { my $self = shift; $self->{name} = shift if @_; $self->{name}; } =head2 $feed->delay =head2 $feed->delay( $seconds ) Number of seconds between updates. =cut sub delay { my $self = shift @_; $self->{delay} = shift if @_; $self->{delay}; } =head2 $feed->link =head2 $feed->link( $rss_channel_url ) The url in the RSS feed with a link back to the site where the RSS feed came from. =cut sub link { my $self = shift @_; $self->{link} = shift if @_; $self->{link}; } =head2 $feed->url =head2 $feed->url( $url ) The url in the RSS feed with a link back to the site where the RSS feed came from. =cut sub url { my $self = shift @_; $self->{url} = shift if @_; $self->{url}; } =head2 $feed->headline_as_id =head2 $feed->headline_as_id( $bool ) Within some RSS feeds the URL may not always be unique, in these cases you can use the headline as the unique id. The id is used to check whether or not a feed is new or has already been seen. =cut sub headline_as_id { my ( $self, $bool ) = @_; if ( defined $bool ) { $self->{headline_as_id} = $bool; $_->headline_as_id($bool) for $self->headlines; } $self->{headline_as_id}; } =head2 $feed->hlobj =head2 $feed->hlobj( $class ) Ablity to use a subclass of L<XML::RSS::Headline>. (See Perl Jobs example in L<XML::RSS::Headline::PerlJobs>). This should just be the name of the subclass. =cut sub hlobj { my ( $self, $hlobj ) = @_; $self->{hlobj} = $hlobj if defined $hlobj; $self->{hlobj}; } =head2 $feed->tmpdir =head2 $feed->tmpdir( $tmpdir ) Temporay directory to store cached RSS XML between instances for persistance. =cut sub tmpdir { my $self = shift @_; $self->{tmpdir} = shift if @_; $self->{tmpdir}; } =head2 $feed->max_headlines =head2 $feed->max_headlines( $integer ) The maximum number of headlines you'd like to keep track of. (0 means infinate) =cut sub max_headlines { my $self = shift @_; $self->{max_headlines} = shift if @_; $self->{max_headlines}; } =head1 DEPRECATED METHODS =head2 $feed->failed_to_fetch This should was deprecated because, the object shouldn't really know anything about fetching, it just processes the results. This method currently will always return false =cut sub failed_to_fetch { warn __PACKAGE__ . "::failed_to_fetch has been deprecated"; return; } =head2 $feed->failed_to_parse This method was deprecated because, $feed->parse now returns a bool value. This method will always return false =cut sub failed_to_parse { warn __PACKAGE__ . "::failed_to_parse has been deprecated"; return; } =head1 AUTHOR Jeff Bisbee, C<< <jbisbee at cpan.org> >> =head1 BUGS Please report any bugs or feature requests to C<bug-xml-rss-feed at rt.cpan.org>, or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=XML-RSS-Feed>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. =head1 SUPPORT You can find documentation for this module with the perldoc command. perldoc XML::RSS::Feed You can also look for information at: =over 4 =item * AnnoCPAN: Annotated CPAN documentation L<http://annocpan.org/dist/XML-RSS-Feed> =item * CPAN Ratings L<http://cpanratings.perl.org/d/XML-RSS-Feed> =item * RT: CPAN's request tracker L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=XML-RSS-Feed> =item * Search CPAN L<http://search.cpan.org/dist/XML-RSS-Feed> =back =head1 ACKNOWLEDGEMENTS Special thanks to Rocco Caputo, Martijn van Beers, Sean Burke, Prakash Kailasa and Randal Schwartz for their help, guidance, patience, and bug reports. Guys thanks for actually taking time to use the code and give good, honest feedback. =head1 COPYRIGHT & LICENSE Copyright 2006 Jeff Bisbee, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 SEE ALSO L<XML::RSS::Headline>, L<XML::RSS::Headline::PerlJobs>, L<XML::RSS::Headline::Fark>, L<XML::RSS::Headline::UsePerlJournals>, L<POE::Component::RSSAggregator> =cut 1; �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������XML-RSS-Feed-2.212/MANIFEST�������������������������������������������������������������������������0000644�0001750�0001750�00000001242�10523466220�014406� 0����������������������������������������������������������������������������������������������������ustar �jbisbee�������������������������jbisbee����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������MANIFEST README Changes examples/example-1.pl lib/XML/RSS/Feed.pm lib/XML/RSS/Headline.pm lib/XML/RSS/Headline/PerlJobs.pm lib/XML/RSS/Headline/Fark.pm lib/XML/RSS/Headline/UsePerlJournals.pm t/001_load.t t/002_parse.t t/003_process.t t/004_process_items.t t/005_create_headline.t t/006_first_seen.t t/007_fetch_feed.t t/008_store_retrieve.t t/009_max_headlines.t t/010_deprecated_methods.t t/011_pod.t t/012_pod_coverage.t t/013_legacy.t t/014_last_updated.t t/015_feed_exceptions.t t/016_title_from_description.t t/017_perljobs.t t/018_debug.t t/019_fark.t t/020_useperljournals.t Makefile.PL META.yml Module meta-data (added by MakeMaker) ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������XML-RSS-Feed-2.212/examples/������������������������������������������������������������������������0000755�0001750�0001750�00000000000�10523620301�015064� 5����������������������������������������������������������������������������������������������������ustar �jbisbee�������������������������jbisbee����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������XML-RSS-Feed-2.212/examples/example-1.pl������������������������������������������������������������0000644�0001750�0001750�00000000612�10523466046�017227� 0����������������������������������������������������������������������������������������������������ustar �jbisbee�������������������������jbisbee����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/perl use strict; use warnings; use XML::RSS::Feed; use LWP::Simple qw(get); my $feed = XML::RSS::Feed->new( url => "http://use.perl.org/index.rss", name => "useperl", delay => 10, debug => 1, tmpdir => "/tmp", ); while (1) { $feed->parse( get( $feed->url ) ); print $_->headline . "\n" for $feed->late_breaking_news; sleep( $feed->delay ); } ����������������������������������������������������������������������������������������������������������������������XML-RSS-Feed-2.212/META.yml�������������������������������������������������������������������������0000644�0001750�0001750�00000001327�10523620301�014522� 0����������������������������������������������������������������������������������������������������ustar �jbisbee�������������������������jbisbee����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������--- #YAML:1.0 name: XML-RSS-Feed version: 2.212 abstract: Persistant XML RSS Encapsulation license: perl generated_by: ExtUtils::MakeMaker version 6.31 distribution_type: module requires: Clone: 0 Digest::MD5: 0 Encode: 0 HTML::Entities: 0 Storable: 0 Test::More: 0 Time::HiRes: 0 URI: 0 XML::RSS: 0 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.2.html version: 1.2 author: - Jeff Bisbee <jbisbee@cpan.org> ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������XML-RSS-Feed-2.212/Makefile.PL����������������������������������������������������������������������0000644�0001750�0001750�00000001312�10523466220�015225� 0����������������������������������������������������������������������������������������������������ustar �jbisbee�������������������������jbisbee����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������use strict; use warnings; use ExtUtils::MakeMaker; WriteMakefile( NAME => 'XML::RSS::Feed', AUTHOR => 'Jeff Bisbee <jbisbee@cpan.org>', VERSION_FROM => 'lib/XML/RSS/Feed.pm', ABSTRACT_FROM => 'lib/XML/RSS/Feed.pm', PL_FILES => {}, PREREQ_PM => { 'Test::More' => 0, 'XML::RSS' => 0, 'Clone' => 0, 'Storable' => 0, 'Time::HiRes' => 0, 'URI' => 0, 'Digest::MD5' => 0, 'Encode' => 0, 'HTML::Entities' => 0, }, dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', }, clean => { FILES => 'XML-RSS-Feed-*' }, LICENSE => 'perl', ); ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������XML-RSS-Feed-2.212/README���������������������������������������������������������������������������0000644�0001750�0001750�00000015760�10523620121�014137� 0����������������������������������������������������������������������������������������������������ustar �jbisbee�������������������������jbisbee����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������NAME XML::RSS::Feed - Persistant XML RSS Encapsulation VERSION 2.212 SYNOPSIS A quick and dirty non-POE example that uses a blocking sleep. The magic is in the late_breaking_news method that returns only headlines it hasn't seen. use XML::RSS::Feed; use LWP::Simple qw(get); my $feed = XML::RSS::Feed->new( url => "http://www.jbisbee.com/rdf/", name => "jbisbee", delay => 10, debug => 1, tmpdir => "/tmp", # optional caching ); while (1) { $feed->parse(get($feed->url)); print $_->headline . "\n" for $feed->late_breaking_news; sleep($feed->delay); } ATTENTION! - If you want a non-blocking way to watch multiple RSS sources with one process use POE::Component::RSSAggregator. CONSTRUCTOR XML::RSS::Feed->new( url => $url, name => $name ) Required Params * name Identifier and hash lookup key for the RSS feed. * url The URL of the RSS feed Optional Params * delay Number of seconds between updates (defaults to 600) * tmpdir Directory to keep a cached feed (using Storable) to keep persistance between instances. * debug Turn debuging on. * headline_as_id Boolean value to use the headline as the id when URL isn't unique within a feed. * hlobj A class name sublcassed from XML::RSS::Headline * max_headlines The max number of headlines to keep. (default is unlimited) METHODS $feed->parse( $xml_string ) Pass in a xml string to parse with XML::RSS and then call process to process the results. $feed->process( $items, $title, $link ) $feed->process( $items, $title ) $feed->process( $items ) Calls pre_process, process_items, post_process, title, and link methods to process the parsed results of an RSS XML feed. * $items An array of hash refs which will eventually become XML::RSS::Headline objects. Look at XML::RSS::Headline->new() for acceptable arguments. * $title The title of the RSS feed. * $link The RSS channel link (normally a URL back to the homepage) of the RSS feed. $feed->pre_process Mark all headlines from previous run as seen. $feed->process_items( $items ) Turn an array refs of hash refs into XML::RSS::Headline objects and added to the internal list of headlines. $feed->post_process Post process cleanup, cache headlines (if tmpdir), and debug messages. $feed->create_headline( %args) Create a new XML::RSS::Headline object and add it to the interal list. Check XML::RSS::Headline->new() for acceptable values for %args. $feed->num_headlines Returns the number of headlines for the feed. $feed->seen_headline( $id ) Just a boolean test to see if we've seen a headline or not. $feed->headlines Returns an array or array reference (based on context) of XML::RSS::Headline objects $feed->late_breaking_news Returns an array or the number of elements (based on context) of the latest XML::RSS::Headline objects. $feed->cache If tmpdir is defined the rss info is cached. $feed->set_last_updated $feed->set_last_updated( Time::HiRes::time ) Set the time of when the feed was last processed. If you pass in a value it will be used otherwise calls Time::HiRes::time. $feed->last_updated The time (in epoch seconds) of when the feed was last processed. $feed->last_updated_hires The time (in epoch seconds and milliseconds) of when the feed was last processed. SET/GET ACCESSOR METHODS $feed->title $feed->title( $title ) The title of the RSS feed. $feed->debug $feed->debug( $bool ) Turn on debugging messages $feed->init $feed->init( $bool ) init is used so that we just load the current headlines and don't return all headlines. in other words we initialize them. Takes a boolean argument. $feed->name $feed->name( $name ) The identifier of an RSS feed. $feed->delay $feed->delay( $seconds ) Number of seconds between updates. $feed->link $feed->link( $rss_channel_url ) The url in the RSS feed with a link back to the site where the RSS feed came from. $feed->url $feed->url( $url ) The url in the RSS feed with a link back to the site where the RSS feed came from. $feed->headline_as_id $feed->headline_as_id( $bool ) Within some RSS feeds the URL may not always be unique, in these cases you can use the headline as the unique id. The id is used to check whether or not a feed is new or has already been seen. $feed->hlobj $feed->hlobj( $class ) Ablity to use a subclass of XML::RSS::Headline. (See Perl Jobs example in XML::RSS::Headline::PerlJobs). This should just be the name of the subclass. $feed->tmpdir $feed->tmpdir( $tmpdir ) Temporay directory to store cached RSS XML between instances for persistance. $feed->max_headlines $feed->max_headlines( $integer ) The maximum number of headlines you'd like to keep track of. (0 means infinate) DEPRECATED METHODS $feed->failed_to_fetch This should was deprecated because, the object shouldn't really know anything about fetching, it just processes the results. This method currently will always return false $feed->failed_to_parse This method was deprecated because, $feed->parse now returns a bool value. This method will always return false AUTHOR Jeff Bisbee, "<jbisbee at cpan.org>" BUGS Please report any bugs or feature requests to "bug-xml-rss-feed at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=XML-RSS-Feed>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. SUPPORT You can find documentation for this module with the perldoc command. perldoc XML::RSS::Feed You can also look for information at: * AnnoCPAN: Annotated CPAN documentation <http://annocpan.org/dist/XML-RSS-Feed> * CPAN Ratings <http://cpanratings.perl.org/d/XML-RSS-Feed> * RT: CPAN's request tracker <http://rt.cpan.org/NoAuth/Bugs.html?Dist=XML-RSS-Feed> * Search CPAN <http://search.cpan.org/dist/XML-RSS-Feed> ACKNOWLEDGEMENTS Special thanks to Rocco Caputo, Martijn van Beers, Sean Burke, Prakash Kailasa and Randal Schwartz for their help, guidance, patience, and bug reports. Guys thanks for actually taking time to use the code and give good, honest feedback. COPYRIGHT & LICENSE Copyright 2006 Jeff Bisbee, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO XML::RSS::Headline, XML::RSS::Headline::PerlJobs, XML::RSS::Headline::Fark, XML::RSS::Headline::UsePerlJournals, POE::Component::RSSAggregator ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������