Changeset 2242

Show
Ignore:
Timestamp:
05/09/07 17:12:52
Author:
miyagawa
Message:

added less-DSLish constructor Web::Scraper->define(sub { ... });

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Web-Scraper/trunk/lib/Web/Scraper.pm

    r2240 r2242  
    2626    $ua ||= LWP::UserAgent->new(agent => __PACKAGE__ . "/" . $VERSION); 
    2727    $ua; 
     28} 
     29 
     30sub define { 
     31    my($class, $coderef) = @_; 
     32    bless { code => $coderef }, $class; 
    2833} 
    2934