From 0bb3c80fb317c8a9b437d2ce7e9b79921b3c5121 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 17 Feb 2004 02:03:57 +0000 Subject: [PATCH] 0.23 --- Changes | 5 +++++ DBSchema.pm | 2 +- DBSchema/DBD/Pg.pm | 11 ++--------- MANIFEST | 4 +++- t/load-mysql.t | 5 +++++ t/load-pg.t | 12 ++++++++++++ t/load.t | 5 +++++ test.pl | 22 ---------------------- 8 files changed, 33 insertions(+), 33 deletions(-) create mode 100644 t/load-mysql.t create mode 100644 t/load-pg.t create mode 100644 t/load.t delete mode 100644 test.pl diff --git a/Changes b/Changes index beef25b..f413bd9 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,10 @@ Revision history for Perl extension DBIx::DBSchema. +0.23 Mon Feb 16 17:35:54 PST 2004 + - Update Pg dependancy to 1.32 + - Update the simple load test so it skips DBIx::DBSchema::DBD::Pg if + DBD::Pg 1.32 is not installed. + 0.22 Thu Oct 23 15:18:21 PDT 2003 - Pg reverse-engineering fix: varchar with no limit - Pg needs (unreleased) DBD::Pg 1.30 (or deb 1.22-2... interesting) diff --git a/DBSchema.pm b/DBSchema.pm index 76f877c..fc4916d 100644 --- a/DBSchema.pm +++ b/DBSchema.pm @@ -14,7 +14,7 @@ use DBIx::DBSchema::ColGroup::Index; #@ISA = qw(Exporter); @ISA = (); -$VERSION = "0.22"; +$VERSION = "0.23"; =head1 NAME diff --git a/DBSchema/DBD/Pg.pm b/DBSchema/DBD/Pg.pm index 4e5495b..f80dfbc 100644 --- a/DBSchema/DBD/Pg.pm +++ b/DBSchema/DBD/Pg.pm @@ -2,19 +2,12 @@ package DBIx::DBSchema::DBD::Pg; use strict; use vars qw($VERSION @ISA %typemap); +use DBD::Pg 1.32; use DBIx::DBSchema::DBD; -$VERSION = '0.07'; +$VERSION = '0.08'; @ISA = qw(DBIx::DBSchema::DBD); -use DBD::Pg; -my $pg_required_version = - ( -e '/etc/debian_version' && $INC{'DBD/Pg.pm'} !~ m(^/usr/local/) ) - ? '1.22' - : '1.30'; -eval "use DBD::Pg $pg_required_version;"; -die $@ if length($@); - %typemap = ( 'BLOB' => 'BYTEA', 'LONG VARBINARY' => 'BYTEA', diff --git a/MANIFEST b/MANIFEST index c57d874..b04de25 100644 --- a/MANIFEST +++ b/MANIFEST @@ -5,7 +5,9 @@ README TODO Makefile.PL DBSchema.pm -test.pl +t/load.t +t/load-mysql.t +t/load-pg.t DBSchema/Table.pm DBSchema/ColGroup.pm DBSchema/ColGroup/Index.pm diff --git a/t/load-mysql.t b/t/load-mysql.t new file mode 100644 index 0000000..78818c1 --- /dev/null +++ b/t/load-mysql.t @@ -0,0 +1,5 @@ +BEGIN { $| = 1; print "1..1\n"; } +END {print "not ok 1\n" unless $loaded;} +use DBIx::DBSchema::DBD::mysql; +$loaded = 1; +print "ok 1\n"; diff --git a/t/load-pg.t b/t/load-pg.t new file mode 100644 index 0000000..93fcf4a --- /dev/null +++ b/t/load-pg.t @@ -0,0 +1,12 @@ +print "1..1\n"; +eval "use DBD::Pg 1.32"; +if ( length($@) ) { + print "ok 1 # Skipped: DBD::Pg 1.32 required for Pg"; +} else { + eval "use DBIx::DBSchema::DBD::Pg;"; + if ( length($@) ) { + print "not ok 1\n"; + } else { + print "ok 1\n"; + } +} diff --git a/t/load.t b/t/load.t new file mode 100644 index 0000000..67ea44b --- /dev/null +++ b/t/load.t @@ -0,0 +1,5 @@ +BEGIN { $| = 1; print "1..1\n"; } +END {print "not ok 1\n" unless $loaded;} +use DBIx::DBSchema; +$loaded = 1; +print "ok 1\n"; diff --git a/test.pl b/test.pl deleted file mode 100644 index cf94f0a..0000000 --- a/test.pl +++ /dev/null @@ -1,22 +0,0 @@ -# Before `make install' is performed this script should be runnable with -# `make test'. After `make install' it should work as `perl test.pl' - -######################### We start with some black magic to print on failure. - -# Change 1..1 below to 1..last_test_to_print . -# (It may become useful if the test is moved to ./t subdirectory.) - -BEGIN { $| = 1; print "1..1\n"; } -END {print "not ok 1\n" unless $loaded;} -use DBIx::DBSchema; -use DBIx::DBSchema::DBD::Pg; -use DBIx::DBSchema::DBD::mysql; -$loaded = 1; -print "ok 1\n"; - -######################### End of black magic. - -# Insert your test code below (better if it prints "ok 13" -# (correspondingly "not ok 13") depending on the success of chunk 13 -# of the test code): - -- 2.11.0