Changeset 2318

Show
Ignore:
Timestamp:
08/28/07 18:52:17
Author:
miyagawa
Message:

Checking in changes prior to tagging of version 0.11. Changelog diff is:

=== Changes
==================================================================
--- Changes (revision 6879)
+++ Changes (local)
@@ -1,5 +1,10 @@

Revision history for Perl extension Web
Scraper

+0.11 Tue Aug 28 02:50:01 PDT 2007
+ - Supported hash-reference in process values, like
+ process "a", "people[]", { link => '@href', name => 'TEXT' };
+ See t/09-process_hash.t for its usage.
+

0.10 Mon Aug 27 00:53:51 PDT 2007

- result now returns the entire stash if called without keys
- added bin/scraper CLI

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Web-Scraper/trunk/Changes

    r2315 r2318  
    11Revision history for Perl extension Web::Scraper 
     2 
     30.11  Tue Aug 28 02:50:01 PDT 2007 
     4        - Supported hash-reference in process values, like 
     5          process "a", "people[]", { link => '@href', name => 'TEXT' }; 
     6          See t/09-process_hash.t for its usage. 
    27 
    380.10  Mon Aug 27 00:53:51 PDT 2007 
  • Web-Scraper/trunk/MANIFEST

    r2315 r2318  
    3737t/07-live.t 
    3838t/08-leak.t 
     39t/09-process_hash.t 
    3940t/perlcriticrc 
  • Web-Scraper/trunk/lib/Web/Scraper.pm

    r2315 r2318  
    77use HTML::Selector::XPath; 
    88 
    9 our $VERSION = '0.10'; 
     9our $VERSION = '0.11'; 
    1010 
    1111sub import { 
     
    136136    } elsif (lc($val) eq 'content' || lc($val) eq 'text') { 
    137137        return $node->as_text; 
     138    } elsif (ref($val) eq 'HASH') { 
     139        my $values; 
     140        for my $key (keys %$val) { 
     141            $values->{$key} = __get_value($node, $val->{$key}); 
     142        } 
     143        return $values; 
    138144    } else { 
    139145        Carp::croak "Unknown value type $val";