Changeset 12

Show
Ignore:
Timestamp:
02/05/06 09:22:41
Author:
miyagawa
Message:

fix Date handling on Aggregate::Simple

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Date.pm

    r7 r12  
    44 
    55use UNIVERSAL::require; 
     6 
     7sub rebless { bless $_[1], $_[0] } 
    68 
    79sub parse { 
  • trunk/plagger/lib/Plagger/Plugin/Aggregator/Simple.pm

    r7 r12  
    3636        $feed->updated($remote->modified); 
    3737 
    38         for my $remote_entry ($remote->entries) { 
     38        for my $e ($remote->entries) { 
    3939            my $entry = Plagger::Entry->new; 
    40             $entry->title($remote_entry->title); 
    41             $entry->author($remote_entry->author); 
    42             $entry->tags([ $remote_entry->category ]) 
    43                 if $remote_entry->category; 
    44             $entry->date($remote_entry->issued); 
    45             $entry->link($remote_entry->link); 
    46             $entry->id($remote_entry->id); 
    47             $entry->body($remote_entry->content->body); 
     40            $entry->title($e->title); 
     41            $entry->author($e->author); 
     42            $entry->tags([ $e->category ]) if $e->category; 
     43            $entry->date( Plagger::Date->rebless($e->issued) ); 
     44            $entry->link($e->link); 
     45            $entry->id($e->id); 
     46            $entry->body($e->content->body); 
    4847 
    4948            $feed->add_entry($entry);