Commits

Toby Inkster committed 2a8a2f6

Cleanups; use 5.010; use Module::Pluggable; reimplement WWW::Finger::CPAN based on MetaCPAN API.

  • Participants
  • Parent commits ccfed46

Comments (0)

Files changed (6)

lib/WWW/Finger.pm

 package WWW::Finger;
 
+use 5.010;
 use common::sense;
-use 5.008;
+use utf8;
 
-use Carp;
-our @Modules;
+use UNIVERSAL::AUTHORITY 0;
+use Carp 0;
 
-our $VERSION = '0.101';
+use namespace::clean;
 
-BEGIN
-{
-	@Modules = ();
-	eval "use WWW::Finger::Fingerpoint;";
-	carp "Could not load Fingerpoint implementation ($@)" if $@;
-	eval "use WWW::Finger::Webfinger;";
-	carp "Could not load Webfinger implementation ($@)" if $@;
+use Module::Pluggable
+	search_path => [qw/WWW::Finger WWW::FingerX/],
+	except      => qr/^WWW::Finger(X?)::_/,
+	require     => 1,
+	inner       => 0,
+	sub_name    => 'plugins',
+	;
+
+BEGIN {
+	$WWW::Finger::AUTHORITY = 'cpan:TOBYINK';
+	$WWW::Finger::VERSION   = '0.101';
 }
 
 sub new
 	my $class      = shift;
 	my $identifier = shift;
 
+	my @Modules = 
+		sort { $a->speed <=> $b->speed }
+		$class->plugins;
+
 	foreach my $module (@Modules)
 	{
 		my $rv = $module->new($identifier);
-		return $rv
-			if defined $rv;
+		return $rv if defined $rv;
 	}
 	
 	return undef;
 }
 
-sub import
-{
-	my $class = shift;
-	foreach my $implementation (@_)
-	{
-		my $module = $implementation;
-		$module =~ s/^\+/WWW::Finger::/;
-		eval "use $module;";
-		carp $@ if $@;
-	}
-}
-
-sub name     { return qw() if wantarray; return undef; }
-sub mbox     { return qw() if wantarray; return undef; }
-sub key      { return qw() if wantarray; return undef; }
-sub image    { return qw() if wantarray; return undef; }
-sub homepage { return qw() if wantarray; return undef; }
-sub weblog   { return qw() if wantarray; return undef; }
+sub name     { return; }
+sub mbox     { return; }
+sub key      { return; }
+sub image    { return; }
+sub homepage { return; }
+sub weblog   { return; }
 sub endpoint { return undef; }
 sub webid    { return undef; }
 sub graph    { return undef; }
 
 WWW::Finger - get useful data from e-mail addresses
 
-=head1 VERSION
-
-0.09
-
 =head1 SYNOPSIS
 
   use WWW::Finger;
 
 =head1 DESCRIPTION
 
-This module is I<not> an implementation of the finger protocol (RFC 1288). Use
-Net::Finger for that. Instead it is a set of implementations of I<other> methods
-for getting information from an e-mail address, or e-mail-like identifier. This package
-includes four such implementations, and it's pretty easy to create your own
-additional implementations:
+This module is I<not> an implementation of the finger protocol (RFC 1288).
+Use Net::Finger for that. Instead it is a set of implementations of
+I<other> methods for getting information from an e-mail address, or e-mail
+like identifier. This package includes four such implementations, and it's
+pretty easy to create your own additional implementations:
 
 =over 8
 
 
 =item * Fingerpoint
 
-=item * cpan.org scraper (for user@cpan.org)
+=item * MetaCPAN API for cpan.org addresses
 
 =item * Unnamed finger protocol described on bitworking.org
 
 =back
 
-Only the first two implementations are enabled by default. See
-"IMPLEMENTATIONS" on how to enable others, and for more details.
-
 =head2 Constructor
 
 =over 8
 
   $finger = WWW::Finger->new($identifier);
 
-Creates a WWW::Finger object for a particular identifier. Will return undef
-if no implemetation is able to handle the identifier
+Creates a WWW::Finger object for a particular identifier. Will return
+undef if no implemetation is able to handle the identifier
 
 =back
 
 Any of these methods can return undef if the appropriate information
 is not available. The C<name>, C<mbox>, C<homepage>, C<weblog>,
 C<image> and C<key> methods work in both scalar and list context.
-Depending on which implementation was used by C<WWW::Finger::new>,
+Depending on which implementation was used by C<< WWW::Finger->new >>,
 the object may also have additional methods. Consult the
 documentation of the various implementations for details.
 
-=over 8
+=over
 
 =item C<name>
 
 
 =back
 
-=head1 IMPLEMENTATIONS
-
-=head2 Loading Additional Implementations
-
-When importing this package ("use WWW::Finger") you can pass it
-a list of additional finger implementations to load. For example:
-
-  use WWW::Finger qw(WWW::Finger::CPAN MyCorp::Finger);
-
-For packages which start with "WWW::Finger::" there is a special
-abbreviation:
-
-  use WWW::Finger qw(+CPAN MyCorp::Finger);
-
-Assuming the finger implementations are written correctly,
-WWW::Finger->new should just notice they exist and use them
-when appropriate.
-
-The WebFinger and Fingerpoint implementations are loaded by
-default.
-
-To load additional implementations later on (after you've
-already "used" WWW::Finger) you can call the import method:
-
-  WWW::Finger->import(qw(+Foo +Bar MyCorp::Baz));
-
-There's no official method of removing an already-imported
-implementation, but if you really need to, try playing around
-with the C<@WWW::Finger::Modules> array.
-
-=head2 Calling an Implementation Specifically
-
-If you need to call a particular implementation specifically,
-that should be fairly simple:
-
-  use WWW::Finger::WebFinger;
-  my $finger = WWW::Finger::WebFinger->new("joe@example.com");
-  if (defined $finger)
-  {
-    print $finger->name . "\n";
-  }
-
-=head2 Writing Your Own Implementation
-
-Use this stub:
-
-  package WWW::Finger::Example;
-  
-  use strict;
-  use WWW::Finger;
-  use URI;
-  
-  our @ISA = qw(WWW::Finger);
-  our $VERSION = '0.01';
-  
-  BEGIN { push @WWW::Finger::Modules, __PACKAGE__; }
-  
-  sub new
-  {
-    my ($class, $identifier) = @_;
-    my $self = {};
-    
-    # Canonicalise the identifier. You don't have to use
-    # "mailto:"; other URI schemes are allowable.
-    $identifier = "mailto:$identifier"
-      unless $identifier =~ /^[a-z0-9\.\-\+]+:/i;
-
-    # Check whether this package can get useful info
-    # from $identifier. If not, then return undef.
-    if ('check things here')
-    {
-      return undef;
-    }
-    
-    $self->{'ident'} = URI->new($identifier);
-    bless $self, $class;
-  }
-  
-  # Override WWW::Finger methods like 'name', 'mbox', etc.
-  # Feel free to provide additional methods too.
-  
-  1;
-
 =head1 SEE ALSO
 
 L<Net::Finger>.
 
 Toby Inkster, E<lt>tobyink@cpan.orgE<gt>
 
-=head1 COPYRIGHT AND LICENSE
+=head1 COPYRIGHT AND LICENCE
 
-Copyright (C) 2009-2010 by Toby Inkster
+Copyright (C) 2009-2011 by Toby Inkster
 
 This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself, either Perl version 5.8 or,
-at your option, any later version of Perl 5 you may have available.
+it under the same terms as Perl itself.
+
+=head1 DISCLAIMER OF WARRANTIES
+
+THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 
 =cut
 

lib/WWW/Finger/BitworkingFingerProtocol.pm

 package WWW::Finger::BitworkingFingerProtocol;
 
-use 5.008;
+use 5.010;
+use common::sense;
+use utf8;
+
+use Carp 0;
+use JSON 2.00;
+use LWP::UserAgent 0;
+use URI 0;
+use URI::Escape 0;
+
 use parent qw(WWW::Finger);
-use common::sense;
 
-use Carp;
-use JSON;
-use LWP::UserAgent;
-use URI;
-use URI::Escape;
-use WWW::Finger;
+BEGIN {
+	$WWW::Finger::BitworkingFingerProtocol::AUTHORITY = 'cpan:TOBYINK';
+	$WWW::Finger::BitworkingFingerProtocol::VERSION   = '0.101';
+}
 
-our $VERSION = '0.101';
-
-BEGIN
-{
-	push @WWW::Finger::Modules, __PACKAGE__;
-}
+sub speed { 105 }
 
 sub new
 {
 }
 
 1;
+
 __END__
+
 =head1 NAME
 
 WWW::Finger::BitworkingFingerProtocol - WWW::Finger module for Joe Gregorio's finger protocol
 
 =head1 SYNOPSIS
 
-  use WWW::Finger qw(+BitworkingFingerProtocol);
+  use WWW::Finger;
   my $finger = WWW::Finger->new("joe@example.com");
   if (defined $finger)
   {
 
 Additional methods (other than standard WWW::Finger):
 
-=over 8
+=over
 
 =item * C<openid> - returns the person's OpenID.
 
 
 Toby Inkster, E<lt>tobyink@cpan.orgE<gt>
 
-=head1 COPYRIGHT AND LICENSE
+=head1 COPYRIGHT AND LICENCE
 
-Copyright (C) 2010 by Toby Inkster
+Copyright (C) 2010-2011 by Toby Inkster
 
 This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself, either Perl version 5.8 or,
-at your option, any later version of Perl 5 you may have available.
+it under the same terms as Perl itself.
+
+=head1 DISCLAIMER OF WARRANTIES
+
+THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 
 =cut

lib/WWW/Finger/CPAN.pm

 package WWW::Finger::CPAN;
 
-use 5.008;
+use 5.010;
+use common::sense;
+use utf8;
+
+use Digest::MD5 0 qw(md5_hex);
+use JSON 2.00 qw(from_json);
+use LWP::Simple 0 qw(get);
+
 use parent qw(WWW::Finger);
-use common::sense;
 
-use Digest::MD5 qw(md5_hex);
-use LWP::Simple;
-use WWW::Finger;
+BEGIN {
+	$WWW::Finger::CPAN::AUTHORITY = 'cpan:TOBYINK';
+	$WWW::Finger::CPAN::VERSION   = '0.101';
+}
 
-our $VERSION = '0.101';
-
-BEGIN
-{
-	# prioritise this module as it can failover very quickly.
-	unshift @WWW::Finger::Modules, __PACKAGE__;
-}
+sub speed { 50 }
 
 sub new
 {
 	my $class = shift;
 	my $ident = shift;
-	my $self = bless {}, $class;
+	my $self  = bless {}, $class;
 
 	$ident = "mailto:$ident"
 		unless $ident =~ /^[a-z0-9\.\-\+]+:/i;
 	return undef
 		unless $ident;
 		
-	$self->{'ident'} = $ident;
+	$self->{ident} = $ident;
 	
-	my ($user, $host) = split /\@/, $self->{'ident'}->to;
+	my ($user, $host) = split /\@/, $self->{ident}->to;
 	return undef
 		unless lc $host eq 'cpan.org';
 	
 sub name
 {
 	my $self = shift;
-	$self->{'pagedata'} = &get( $self->cpanpage )
-		unless $self->{'pagedata'};
-	my $name = '';
+	my $name = $self->metacpan_data->{name};
 	
-	if ($self->{'pagedata'} =~ /<title>(.+) - search.cpan.org/)
-	{
-		$name = $1;
-	}
-	else
-	{
-		my ($user, $host) = split /\@/, $self->{'ident'}->to;
-		$name = uc $user;
-	}
-	if (wantarray)
-	{
-		return @{ [$name] };
-	}
-	else
-	{
-		return $name;
-	}
-	
+	return wantarray
+		? @{ [$name] }
+		: $name;
 }
 
 sub mbox
 {
+	my $self = shift;	
+	my @e    = @{$self->metacpan_data->{email}};
+	
+	return wantarray
+		? @e
+		: $e[0];
+}
+
+sub pauseid
+{
 	my $self = shift;
-	
-	$self->{'pagedata'} = &get( $self->cpanpage )
-		unless $self->{'pagedata'};
-	my @e;
+	my ($user, $host) = split /\@/, uc $self->{ident}->to;
 
-	if ($self->{'pagedata'} =~ m`<td class=cell><a href="(mailto:[^"]+)">`)
-	{
-		push @e, $1;
-	}
-	my ($user, $host) = split /\@/, $self->{'ident'}->to;
-	push @e, 'mailto:' . $user . '@cpan.org'
-		unless lc $e[0] eq 'mailto:' . $user . '@cpan.org';
-	
-	if (wantarray)
-	{
-		return @e;
-	}
-	else
-	{
-		return $e[0];
-	}
+	return wantarray
+		? @{[ $user ]}
+		: $user;
 }
 
 sub cpanpage
 {
 	my $self = shift;
-	my ($user, $host) = split /\@/, $self->{'ident'}->to;
-	my $cpanpage = 'http://search.cpan.org/~' . $user . '/';
+	my $user = $self->pauseid;
+	my $cpanpage = 'https://metacpan.org/author/' . (uc $user) . '/';
 	
-	if (wantarray)
-	{
-		return @{[$cpanpage]};
-	}
-	else
-	{
-		return $cpanpage;
-	}
+	return wantarray
+		? @{[$cpanpage]}
+		: $cpanpage;
 }
 
 sub homepage
 {
 	my $self = shift;
+	my @hp   = @{$self->metacpan_data->{website}};
 	
-	$self->{'pagedata'} = &get( $self->cpanpage )
-		unless $self->{'pagedata'};
-	my @hp;
-
-	if ($self->{'pagedata'} =~ m`<a href="([^"]+)" rel="me">`)
-	{
-		push @hp, $1;
-	}
-	push @hp, $self->cpanpage;
+	push @hp, scalar $self->cpanpage
+		unless grep { $self->cpanpage eq $_ } @hp;
 	
-	if (wantarray)
-	{
-		return @hp;
-	}
-	else
-	{
-		return $hp[0];
-	}
+	return wantarray
+		? @hp
+		: $hp[0];
 }
 
 sub image
 {
 	my $self = shift;
-	my $md5 = lc md5_hex(lc $self->{'ident'}->to);
-	if (wantarray)
+	my $md5  = lc md5_hex(lc $self->{ident}->to);
+	
+	return wantarray
+		? @{ ["http://www.gravatar.com/avatar/$md5.jpg"] }
+		: "http://www.gravatar.com/avatar/$md5.jpg";
+}
+
+sub weblog
+{
+	my $self = shift;	
+	my @blog = map { $_->{url} } @{$self->metacpan_data->{blog}};
+	
+	return wantarray
+		? @blog
+		: $blog[0];
+}
+
+sub metacpan_data
+{
+	my $self = shift;
+	
+	unless ($self->{metacpan_data})
 	{
-		return @{ ["http://www.gravatar.com/avatar/$md5.jpg"] };
+		my $user = $self->pauseid;
+		my $uri  = sprintf('http://api.metacpan.org/v0/author/%s', uc $user);
+		$self->{metacpan_data} = from_json(get($uri));
 	}
-	else
+	
+	$self->{metacpan_data};
+}
+
+sub releases
+{
+	my $self = shift;
+	
+	unless ($self->{releases})
 	{
-		return "http://www.gravatar.com/avatar/$md5.jpg";
+		my $user = $self->pauseid;
+		my $uri  = sprintf('http://api.metacpan.org/v0/release/_search?q=author:%s%%20AND%%20status:latest&size=100', uc $user);
+		$self->{releases} = [ map { $_->{_source} } @{ from_json(get($uri))->{hits}->{hits} } ];
 	}
+	
+	return wantarray
+		? @{ $self->{releases} }
+		: scalar @{ $self->{releases} };
 }
 
 sub webid
 {
 	my $self = shift;
-	my ($user, $host) = split /\@/, $self->{'ident'}->to;
-	my $cpanpage = 'http://purl.org/NET/cpan-uri/person/' . $user;
+	my $user = $self->pauseid;
+	my $webid = 'http://purl.org/NET/cpan-uri/person/' . lc $user;
 	
-	if (wantarray)
-	{
-		return @{[$cpanpage]};
-	}
-	else
-	{
-		return $cpanpage;
-	}
+	return wantarray
+		? @{[ $webid ]}
+		: $webid;
 }
 
 1;
 
 =head1 NAME
 
-WWW::Finger::CPAN - WWW::Finger implementation which scrapes cpan.org.
+WWW::Finger::CPAN - WWW::Finger implementation using MetaCPAN.
 
 =head1 DESCRIPTION
 
 Additional methods (other than standard WWW::Finger):
 
-=over 8
+=over
 
-=item * C<cpanpage> - returns the person's search.cpan.org homepage.
+=item * C<pauseid> - returns the person's PAUSE ID.
+
+=item * C<cpanpage> - returns the person's metacpan.org homepage.
+
+=item * C<metacpan_data> - hashref of interesting data.
+
+=item * C<releases> - list of releases. If called in scalar context, count of releases.
 
 =back
 
 
 Toby Inkster, E<lt>tobyink@cpan.orgE<gt>
 
-=head1 COPYRIGHT AND LICENSE
+=head1 COPYRIGHT AND LICENCE
 
-Copyright (C) 2009-2010 by Toby Inkster
+Copyright (C) 2009-2011 by Toby Inkster
 
 This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself, either Perl version 5.8 or,
-at your option, any later version of Perl 5 you may have available.
+it under the same terms as Perl itself.
 
+=head1 DISCLAIMER OF WARRANTIES
+
+THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 
 =cut

lib/WWW/Finger/Fingerpoint.pm

 package WWW::Finger::Fingerpoint;
 
-use 5.008;
+use 5.010;
+use common::sense;
+use utf8;
+
+use Carp 0;
+use Digest::SHA1 0 qw[sha1_hex];
+use HTTP::Link::Parser 0.102 qw[:standard];
+use LWP::UserAgent 0;
+use RDF::Query::Client 0.106;
+use RDF::Trine 0.135;
+use URI 0;
+
 use parent qw[WWW::Finger];
-use common::sense;
 
-use Carp;
-use Digest::SHA1 qw[sha1_hex];
-use HTTP::Link::Parser qw[:standard];
-use LWP::UserAgent;
-use RDF::Query::Client;
-use RDF::Trine;
-use URI;
-use WWW::Finger;
+BEGIN {
+	$WWW::Finger::Fingerpoint::AUTHORITY = 'cpan:TOBYINK';
+	$WWW::Finger::Fingerpoint::VERSION   = '0.101';
+}
 
-our $VERSION = '0.101';
+use constant rel_fingerpoint => 'http://ontologi.es/sparql#fingerpoint';
 
-my $rel_fingerpoint = 'http://ontologi.es/sparql#fingerpoint';
-
-BEGIN
-{
-	push @WWW::Finger::Modules, __PACKAGE__;
-}
+sub speed { 90 }
 
 sub new
 {
 		unless $response->is_success;
 	
 	my $linkdata = HTTP::Link::Parser::parse_links_to_rdfjson($response);
-	my $sparql   = $linkdata->{ $httphost }->{ $rel_fingerpoint }->[0]->{'value'};
+	my $sparql   = $linkdata->{ $httphost }->{ (rel_fingerpoint) }->[0]->{'value'};
 
 	unless (defined $sparql)
 	{
 }
 
 1;
+
 __END__
 
 =head1 NAME
 As well as the standard WWW::Finger methods, WWW::Finger::Fingerpoint provides this
 additional method:
 
-=over 4
+=over
 
 =item C<< get($p1, $p2, ...) >>
 
 
 Toby Inkster, E<lt>tobyink@cpan.orgE<gt>
 
-=head1 COPYRIGHT AND LICENSE
+=head1 COPYRIGHT AND LICENCE
 
-Copyright (C) 2009-2010 by Toby Inkster
+Copyright (C) 2009-2011 by Toby Inkster
 
 This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself, either Perl version 5.8 or,
-at your option, any later version of Perl 5 you may have available.
+it under the same terms as Perl itself.
 
+=head1 DISCLAIMER OF WARRANTIES
+
+THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 
 =cut

lib/WWW/Finger/Webfinger.pm

 package WWW::Finger::Webfinger;
 
-use 5.008;
+use 5.010;
+use common::sense;
+use utf8;
+
+use Carp 0;
+use HTTP::LRDD 0.104;
+use LWP::UserAgent 0;
+use RDF::Query 2.900;
+use RDF::Trine 0.135 qw[iri];
+use URI 0;
+use URI::Escape 0;
+use XRD::Parser 0.102;
+
 use parent qw(WWW::Finger::_GenericRDF);
-use common::sense;
 
-use Carp;
-use HTTP::LRDD '0.100';
-use LWP::UserAgent;
-use RDF::Query;
-use RDF::Trine qw[iri];
-use URI;
-use URI::Escape;
-use WWW::Finger;
-use XRD::Parser '0.100';
+BEGIN {
+	$WWW::Finger::Webfinger::AUTHORITY = 'cpan:TOBYINK';
+	$WWW::Finger::Webfinger::VERSION   = '0.101';
+}
 
-our $VERSION = '0.101';
-
-BEGIN
-{
-	push @WWW::Finger::Modules, __PACKAGE__;
-}
+sub speed { 100 }
 
 sub new
 {
 		return $results[0];
 	}
 	
-	return undef;
+	return;
 }
 
 sub webid
 {
-	my $self = shift;
-	return $self->SUPER::webid(@_);
+	return (shift)->SUPER::webid(@_);
 }
 
 1;
+
 __END__
+
 =head1 NAME
 
 WWW::Finger::Webfinger - WWW::Finger module for Webfinger
 The following relationships/properties are understood in the account
 description:
 
-=over 8
+=over
 
 =item * http://xmlns.com/foaf/0.1/name
 
 
 =back
 
-=over 4
+=over
 
 As well as the standard WWW::Finger methods, WWW::Finger::Webfinger provides this
 additional method:
 
 Toby Inkster, E<lt>tobyink@cpan.orgE<gt>
 
-=head1 COPYRIGHT AND LICENSE
+=head1 COPYRIGHT AND LICENCE
 
-Copyright (C) 2009-2010 by Toby Inkster
+Copyright (C) 2009-2011 by Toby Inkster
 
 This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself, either Perl version 5.8 or,
-at your option, any later version of Perl 5 you may have available.
+it under the same terms as Perl itself.
 
+=head1 DISCLAIMER OF WARRANTIES
+
+THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 
 =cut

lib/WWW/Finger/_GenericRDF.pm

 # Below is not a proper WWW::Finger implementation, but is rather a
 # framework which real implementations can hook onto by subclassing.
 
-use 5.008;
+use 5.010;
+use common::sense;
+use utf8;
+
+use Digest::SHA1 0 qw(sha1_hex);
+use HTTP::Link::Parser 0.102 qw();
+use LWP::UserAgent 0;
+use RDF::Query 2.900;
+use RDF::Trine 0.135;
+
 use parent qw(WWW::Finger);
-use common::sense;
 
-use Digest::SHA1 qw(sha1_hex);
-use HTTP::Link::Parser qw();
-use LWP::UserAgent;
-use RDF::Query;
-use RDF::Trine 0.112;
-
-our $VERSION = '0.101';
+BEGIN {
+	$WWW::Finger::_GenericRDF::AUTHORITY = 'cpan:TOBYINK';
+	$WWW::Finger::_GenericRDF::VERSION   = '0.101';
+}
 
 sub _new_from_response
 {
 	return $ep;
 }
 
-1;
+1;
+
+__END__
+
+=head1 NAME
+
+WWW::Finger::_GenericRDF - reusable base
+
+=head1 AUTHOR
+
+Toby Inkster, E<lt>tobyink@cpan.orgE<gt>
+
+=head1 COPYRIGHT AND LICENCE
+
+Copyright (C) 2009-2011 by Toby Inkster
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=head1 DISCLAIMER OF WARRANTIES
+
+THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+=cut