Changeset 858
- Timestamp:
- 05/30/06 15:28:35
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/plagger/lib/Plagger/Plugin/Subscription/FOAF.pm
r852 r858 5 5 6 6 use base qw(Plagger::Plugin); 7 use Plagger::Util qw(load_uri);7 use Plagger::Util; 8 8 9 9 use XML::FOAF; … … 27 27 my ( $self, $context, $uri ) = @_; 28 28 29 my $content = load_uri $uri;29 my $content = Plagger::Util::load_uri($uri); 30 30 31 31 my $person = eval { XML::FOAF->new( \$content, $uri )->person }; 32 32 33 33 unless ($person) { 34 $context->log( debug =>XML::FOAF->errstr );34 $context->log( erorr => "Error loading FOAF file $uri: " . XML::FOAF->errstr ); 35 35 return; 36 36 } 37 37 38 38 for my $friend ( @{ $person->knows } ) { 39 my $blog = $friend->weblog or next; 40 39 41 my $feed = Plagger::Feed->new; 40 41 $feed->url( $friend->weblog or next ); 42 $feed->url($blog); 42 43 43 44 $context->subscription->add($feed); … … 45 46 46 47 return 1; 47 48 48 } 49 49 … … 56 56 =head1 SYNOPSIS 57 57 58 -module: Subscription::FOAF59 config:60 url: http://user.livejournal.com/data/foaf58 - module: Subscription::FOAF 59 config: 60 url: http://user.livejournal.com/data/foaf 61 61 62 62 =head1 DESCRIPTION trunk/plagger/lib/Plagger/Plugin/Subscription/File.pm
r857 r858 42 42 =head1 SYNOPSIS 43 43 44 -module: Subscription::File45 config:46 file: feeds.txt44 - module: Subscription::File 45 config: 46 file: feeds.txt 47 47 48 48 =head1 DESCRIPTION
