diff --git a/Makefile.PL b/Makefile.PL index cb4e2de..7bc390d 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,3 +1,8 @@ +#!/usr/bin/perl -w + +# $Id: Makefile.PL,v 1.3 2002/08/22 16:10:24 david Exp $ + +use strict; use ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. diff --git a/t/dbh.t b/t/dbh.t index ec500b1..92c68c8 100644 --- a/t/dbh.t +++ b/t/dbh.t @@ -1,4 +1,6 @@ #!/usr/bin/perl -w + +# $Id: dbh.t,v 1.3 2002/08/22 16:10:24 david Exp $ use strict; use Test::More (tests => 27); @@ -15,7 +17,7 @@ END { $dbh->disconnect if $dbh }; # Check that the error_handler has been installed. -ok( UNIVERSAL::isa($dbh->{HandleError}, 'CODE'), "Check HandlError" ); +isa_ok( $dbh->{HandleError}, 'CODE' ); # Trigger an exception. eval { @@ -24,11 +26,9 @@ # Make sure we got the proper exception. ok( my $err = $@, "Get exception" ); -ok( UNIVERSAL::isa($err, 'Exception::Class::DBI'), "Check E::C::DBI" ); -ok( UNIVERSAL::isa($err, 'Exception::Class::DBI::H'), - "Check E::C::DBI::H" ); -ok( UNIVERSAL::isa($err, 'Exception::Class::DBI::DBH'), - "Check E::C::DBI::DBH" ); +isa_ok( $err, 'Exception::Class::DBI' ); +isa_ok( $err, 'Exception::Class::DBI::H' ); +isa_ok( $err, 'Exception::Class::DBI::DBH' ); # Check the accessor values. ok( $err->err == 1, "Check err" ); diff --git a/t/drh.t b/t/drh.t index 6f931b9..fa899cf 100644 --- a/t/drh.t +++ b/t/drh.t @@ -1,4 +1,6 @@ #!/usr/bin/perl -w + +# $Id: drh.t,v 1.4 2002/08/22 16:10:24 david Exp $ use strict; use Test::More (tests => 21); @@ -26,11 +28,9 @@ skip 'HandleError not logic not yet used by DBI->connect', 20 unless $@; ok( my $err = $@, "Caught exception" ); - ok( UNIVERSAL::isa($err, 'Exception::Class::DBI'), "Check E::C::DBI" ); - ok( UNIVERSAL::isa($err, 'Exception::Class::DBI::H'), - "Check E::C::DBI::H" ); - ok( UNIVERSAL::isa($err, 'Exception::Class::DBI::DRH'), - "Check E::C::DBI::DRH" ); + isa_ok( $err, 'Exception::Class::DBI' ); + isa_ok( $err, 'Exception::Class::DBI::H' ); + isa_ok( $err, 'Exception::Class::DBI::DRH' ); ok( $err->err == 7, "Check err" ); is( $err->error, 'DBI->connect(dummy) failed: Dammit Jim!', 'Check error' ); diff --git a/t/sth.t b/t/sth.t index 976c37c..bc3804e 100644 --- a/t/sth.t +++ b/t/sth.t @@ -1,4 +1,6 @@ #!/usr/bin/perl -w + +# $Id: sth.t,v 1.3 2002/08/22 16:10:24 david Exp $ use strict; use Test::More (tests => 35); @@ -17,7 +19,7 @@ END { $dbh->disconnect if $dbh }; # Check that the error_handler has been installed. -ok( UNIVERSAL::isa($dbh->{HandleError}, 'CODE'), "Check HandlError" ); +isa_ok( $dbh->{HandleError}, 'CODE' ); # Trigger an exception. eval { @@ -29,11 +31,9 @@ # Make sure we got the proper exception. ok( my $err = $@, "Get exception" ); -ok( UNIVERSAL::isa($err, 'Exception::Class::DBI'), "Check E::C::DBI" ); -ok( UNIVERSAL::isa($err, 'Exception::Class::DBI::H'), - "Check E::C::DBI::H" ); -ok( UNIVERSAL::isa($err, 'Exception::Class::DBI::STH'), - "Check E::C::DBI::STH" ); +isa_ok( $err, 'Exception::Class::DBI' ); +isa_ok( $err, 'Exception::Class::DBI::H' ); +isa_ok( $err, 'Exception::Class::DBI::STH' ); ok( $err->err == 7, "Check err" ); is( $err->errstr, 'ERROR: Relation "foo" does not exist',