Changeset 1842

Show
Ignore:
Timestamp:
11/24/06 09:03:30
Author:
miyagawa
Message:

removed CR from sample XML files. Support geo:Point in Namespace::Geo

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/feature-geo/plagger/lib/Plagger/Plugin/Namespace/Geo.pm

    r1841 r1842  
    1717    # XXX for now RSS only, do the same for Atom 
    1818    my $geo = $args->{orig_entry}->{entry}->{$geo_ns} || {}; 
     19       $geo = $geo->{Point}->{geo} if $geo->{Point}; 
    1920    if (defined($geo->{lat}) && defined($geo->{long})) { 
    2021        my $loc = Plagger::Location->new; 
  • branches/feature-geo/plagger/t/plugins/Namespace-Geo/base.t

    r1841 r1842  
    44 
    55test_plugin_deps; 
    6 plan tests => 2
     6plan tests => 4
    77run_eval_expected; 
    88 
     
    1919      feed: 
    2020        - file://$t::TestPlagger::BaseDirURI/t/samples/rss2-geo.xml 
     21        - file://$t::TestPlagger::BaseDirURI/t/samples/rss2-geo-point.xml 
    2122  - module: Namespace::Geo 
    2223  - module: Aggregator::Simple 
     
    2526is $feeds[0]->entries->[0]->location->latitude, 26.58; 
    2627is $feeds[0]->entries->[0]->location->longitude, -97.83; 
     28is $feeds[1]->entries->[0]->location->latitude, 26.58; 
     29is $feeds[1]->entries->[0]->location->longitude, -97.83;