in reply to RFC: PDAScraper, A module to scrape website content for PDAs

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:
#!/usr/bin/perl use strict; use warnings; use PDAScraper; use PDAScraper::YahooTV; my $YM_Scraper = PDAScraper->new('PDA­Scraper::YahooTV') || die "$!"; $YM_Scraper->scrape(­); use PDAScraper::Slate; my $Slate_Scraper = PDAScraper->new('PDA­Scraper::Slate') || die "$!"; $Slate_Scraper->scra­pe(); use PDAScraper::NewScien­tist; my $NS_Scraper = PDAScraper->new('PDA­Scraper::NewScientis­t') || die "$!"; $NS_Scraper->scrape(­);
How about make that sample script possible with just:
use PDAScraper qw( YahooTV Slate NewScientist );

Then one could even just do perl -MPDAScraper=YahooTV,Slate,....

Thanks for sharing this.

- tye        

Replies are listed 'Best First'.
Re^2: RFC: PDAScraper, A module to scrape website content for PDAs (nice)
by Cody Pendant (Prior) on Jul 29, 2005 at 02:51 UTC
    Thanks for that. I really appreciate your comments. My liking for "unless" is quite irrational, I know.

    Shall I submit this to CPAN, or somewhere else, assuming those changes? Its target audience is relatively small, but on the other hand, it would grow in usefulness for that audience if there was a community of people sharing and improving the individual scrapers.



    ($_='kkvvttuu bbooppuuiiffss qqffssmm iibbddllffss')
    =~y~b-v~a-z~s; print

      Yes, it appears to me to be plenty polished enough to be on CPAN. Though for that I'd prefer it have a name that fit into an existing top-level namespace. Even just HTTP::PDAScraper would be fine with me. But I won't dwell on that and I'll trust you with the naming.

      - tye