Commits

Toby Inkster committed 0fb16d5 Draft

bump version number; mini fixes

Comments (0)

Files changed (4)

examples/testing.pl

 HTRS2zGtz4CPPbA9Y4YYg/aP9NeLGw4dLcP+j5FhpkCkLMUVqDxKyBmcjkQVPz8=
 -----END CERTIFICATE-----';
 
-my $auth = CGI::Auth::FOAF_SSL->new($foaf_ssl_webid);
+my $auth = CGI::Auth::FOAF_SSL->new($cert);
 p $auth;
 
 #print $auth->account->identity . "\n";

lib/CGI/Auth/FOAF_SSL.pm

 
 use CGI::Auth::FOAF_SSL::Agent 0;
 use Scalar::Util 0 qw[blessed];
-use Web::ID 1.900;
+use Web::ID 1.921;
 use Web::ID::Util;
 
 use constant 0 {
 
 BEGIN {
 	$CGI::Auth::FOAF_SSL::AUTHORITY = 'cpan:TOBYINK';
-	$CGI::Auth::FOAF_SSL::VERSION   = '1.910_02';
+	$CGI::Auth::FOAF_SSL::VERSION   = '1.921_00';
 }
 
 our $ua_string = sprintf('%s/%s ', __PACKAGE__, __PACKAGE__->VERSION);
 	handles    => [qw[cookie]],
 	);
 
+has subject => (
+	is         => read_only,
+	isa        => 'CGI::Auth::FOAF_SSL::Agent',
+	lazy_build => true,
+	);
+
 sub BUILDARGS
 {
 	my $class = shift;
 
 sub new_from_cgi
 {
+	require CGI;
+	
 	my ($class, $cgi, @params) = @_;
 	$cgi ||= CGI->new;	
 	return unless $cgi->https;
 	shift->new(@_);
 }
 
-sub subject
+sub _build_subject
 {
 	my ($self) = @_;
 
 	CGI::Auth::FOAF_SSL::Agent->new(
-		$self->subject_uri,
-		$self->subject_model,
-		$self->subject_endpoint,
-		$self->web_id_object,
-		);
+		scalar $self->subject_uri,
+		scalar $self->subject_model,
+		scalar $self->subject_endpoint,
+		scalar $self->web_id_object,
+	);
 }
 
-*certified_thing = \&subject;
-*agent           = \&subject;
-*account         = sub { +return };
+*certified_thing = sub { shift->subject; };
+*agent           = sub { shift->subject; };
+*account         = sub { return; };
 
 sub validation
 {
 now deprecated in favour of L<Web::ID>.
 
 L<Web::ID> has a cleaner interface and is less CGI-specific. It should
-work equanlly well in other HTTPS contexts. It has L<Plack> middleware
+work equally well in other HTTPS contexts. It has L<Plack> middleware
 (but its core does not rely on Plack). Use it.
 
-CGI::Auth::FOAF_SSL is now just a backwards-compatibility wrapper around
-L<Web::ID>. It will be maintained until at least June 2013.
+CGI::Auth::FOAF_SSL 1.9xx and above is now just a backwards-compatibility
+wrapper around L<Web::ID>. It will be maintained until at least June 2013.
 
 =head1 SYNOPSIS
 

lib/CGI/Auth/FOAF_SSL/Agent.pm

 
 BEGIN {
 	$CGI::Auth::FOAF_SSL::Agent::AUTHORITY = 'cpan:TOBYINK';
-	$CGI::Auth::FOAF_SSL::Agent::VERSION   = '1.910_02';
+	$CGI::Auth::FOAF_SSL::Agent::VERSION   = '1.921_00';
 }
 
 sub new

meta/makefile.ttl

 	:version_from _:main ;
 	:readme_from _:main ;
 	:test_requires 
-		"Module::Pluggable 0.66" , # why?? do we need this?? did we ever need this??
 		"Test::More 0.61" ;
-	:recommends
-		"WWW::Finger 0.100" ;
 	:requires
-		"common::sense" ,
-		"parent" ,
-		"CGI" ,
-		"CGI::Session" ,
-		"Crypt::X509 0.50" ,
-		"DateTime" ,
-		"LWP::UserAgent" ,
-		"Math::BigInt" ,
-		"MIME::Base64" ,
-		"Object::ID" ,
-		"RDF::TrineShortcuts 0.100" ,
-		"Scalar::Util 0" .
+		"Any::Moose" ,
+		"CGI",
+		"CGI::Session",
+		"Web::ID 1.921" .
 
 _:main <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#fileName> "lib/CGI/Auth/FOAF_SSL.pm" .
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.