Very nice, indeed.
Quite minor suggestions: Move the __DATA__ lines into a here-doc (though I mostly dislike here-docs) so I don't have to scroll down to see what the point of that <DATA> line is and so your module doesn't leave a file handle open that it then never uses again. I dislike 'unless' and your use of it did cause me to have to do a double-take when reading the code (which reinforces my dislike for it).
Regarding:
Sample Script:How about make that sample script possible with just:#!/usr/bin/perl use strict; use warnings; use PDAScraper; use PDAScraper::YahooTV; my $YM_Scraper = PDAScraper->new('PDAScraper::YahooTV') || die "$!"; $YM_Scraper->scrape(); use PDAScraper::Slate; my $Slate_Scraper = PDAScraper->new('PDAScraper::Slate') || die "$!"; $Slate_Scraper->scrape(); use PDAScraper::NewScientist; my $NS_Scraper = PDAScraper->new('PDAScraper::NewScientist') || die "$!"; $NS_Scraper->scrape();
use PDAScraper qw( YahooTV Slate NewScientist );
Then one could even just do perl -MPDAScraper=YahooTV,Slate,....
Thanks for sharing this.
- tye
In reply to Re: RFC: PDAScraper, A module to scrape website content for PDAs (nice)
by tye
in thread RFC: PDAScraper, A module to scrape website content for PDAs
by Cody Pendant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |