Index: t/04-fatal.t
===================================================================
--- t/04-fatal.t (revision 29)
+++ t/04-fatal.t (working copy)
@@ -2,7 +2,7 @@
use lib '.';
-use Test::More tests => 2;
+use Test::More tests => 1;
use t::MockUserAgent;
use Authen::CAS::Client;
@@ -16,5 +16,4 @@
$mock->_response( 404, 'Not found' );
eval { $cas->validate( 'S', 'T' ) };
-ok( UNIVERSAL::isa( $@, 'Authen::CAS::Client::Response::Error' ), "fatal" );
-like( $@->error(), qr/^HTTP request failed: \d+: / );
+like( $@, qr/^HTTP request failed: \d+: / );
Index: lib/Authen/CAS/Client.pm
===================================================================
--- lib/Authen/CAS/Client.pm (revision 29)
+++ lib/Authen/CAS/Client.pm (working copy)
@@ -13,7 +13,7 @@
use XML::LibXML;
use Authen::CAS::Client::Response;
-our $VERSION = '0.03';
+our $VERSION = '0.03_01';
#======================================================================
# constructor
@@ -39,11 +39,10 @@
sub _error {
my ( $self, $error ) = @_;
- my $response = Authen::CAS::Client::Response::Error->new( error => $error );
- die $response
+ die $error
if $self->{_fatal};
- $response;
+ Authen::CAS::Client::Response::Error->new( error => $error );
}
sub _parse_auth_response {
@@ -369,11 +368,10 @@
=item * fatal =E<gt> $BOOLEAN
-If this argument is true, the CAS client will C<die()> with an
-C<Authen::CAS::Client::Response::Error> object whenever an error
-occurs. Otherwise an C<Authen::CAS::Client::Response::Error>
-object is returned, instead. See L<Authen::CAS::Client::Response>
-for more detail on response objects.
+If this argument is true, the CAS client will C<die()> when an error
+occurs and C<$@> will contain the error message. Otherwise an
+C<Authen::CAS::Client::Response::Error> object will be returned. See
+L<Authen::CAS::Client::Response> for more detail on response objects.
=back
@@ -515,7 +513,7 @@
=head1 COPYRIGHT
-Copyright (c) 2007, 2008, jason hord
+Copyright (c) 2007-2009, jason hord
All rights reserved.