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        


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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.