Changeset 1265

Show
Ignore:
Timestamp:
08/10/06 12:09:42
Author:
miyagawa
Message:

support Atom 1.0 entry without atom:published but atom:updated. (Atom 1.0 spec says published is optional)
Spotted by jwang

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Plugin/Aggregator/Simple.pm

    r1264 r1265  
    142142        } 
    143143 
    144         $entry->date( Plagger::Date->rebless($e->issued) ) 
    145             if eval { $e->issued }
     144        my $date = eval { $e->issued } || eval { $e->modified }; 
     145        $entry->date( Plagger::Date->rebless($date) ) if $date
    146146 
    147147        # xxx nasty hack. We should remove this once XML::Atom or XML::Feed is fixed 
  • trunk/plagger/t/regression/atom1-category.t

    r1264 r1265  
    1717is_deeply scalar $context->update->feeds->[0]->entries->[0]->tags, [ 'Catalyst' ]; 
    1818is_deeply scalar $context->update->feeds->[0]->entries->[1]->tags, [ 'Catalyst', 'Programming' ]; 
     19is $context->update->feeds->[0]->entries->[0]->date->epoch, 1155150478; 
     20