Show
Ignore:
Timestamp:
01/27/09 11:08:08 (4 years ago)
Author:
unau
Message:
 
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/HappySync/trunk/lib/HappySync/Entry.pm

    r29048 r29106  
    1111 
    1212sub new($$$) { 
    13     my ($class, $client, $syncpoint) = @_; 
     13    my ($class, $client, $xmlSimpleInstance, $syncpoint) = @_; 
    1414    bless { 
    1515           'client'      => $client, 
     16           'xs'          => $xmlSimpleInstance, 
    1617           'syncpoint'   => $syncpoint, 
    1718       }; 
     
    6263 
    6364sub new($$$) { 
    64     my ($class, $client, $syncpoint) = @_; 
     65    my ($class, $client, $xmlSimpleInstance, $syncpoint) = @_; 
    6566    bless { 
    6667           'client'      => $client, 
     68           'xs'          => $xmlSimpleInstance, 
    6769           'syncpoint'   => $syncpoint, 
    6870       }; 
     
    131133 
    132134sub new($$$) { 
    133     my ($class, $client, $syncpoint) = @_; 
     135    my ($class, $client, $xmlSimpleInstance, $syncpoint) = @_; 
    134136    bless { 
    135137           'client'      => $client, 
     138           'xs'          => $xmlSimpleInstance, 
    136139           'syncpoint'   => $syncpoint, 
    137140       }; 
     
    142145    my $meta = shift; 
    143146 
    144     $self->{uri} = $meta->{link}->{href}; 
     147#    print STDERR Dumper($meta->{link}); 
     148    $self->{uri} = $meta->{link}[0]->{href}; 
     149#    $self->{uri} = $meta->{link}->{href}; 
    145150} 
    146151 
     
    157162    my $client = $self->{client}; 
    158163    my $feed = $client->getFeed($self->{uri}); 
    159     my $body = XMLin($feed->as_xml); 
     164    if (! $feed) { 
     165        print STDERR "ERR URI:\t".$self->{uri}."\n"; 
     166        return; 
     167    } 
     168    my $body = $self->{xs}->XMLin($feed->as_xml); 
    160169 
    161170    my $source  = $body->{content}->{content} || q{};