0.23 DBIx_DBSchema_0_23
authorivan <ivan>
Tue, 17 Feb 2004 02:03:57 +0000 (02:03 +0000)
committerivan <ivan>
Tue, 17 Feb 2004 02:03:57 +0000 (02:03 +0000)
Changes
DBSchema.pm
DBSchema/DBD/Pg.pm
MANIFEST
t/load-mysql.t [new file with mode: 0644]
t/load-pg.t [new file with mode: 0644]
t/load.t [new file with mode: 0644]
test.pl [deleted file]

diff --git a/Changes b/Changes
index beef25b..f413bd9 100644 (file)
--- 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)
index 76f877c..fc4916d 100644 (file)
@@ -14,7 +14,7 @@ use DBIx::DBSchema::ColGroup::Index;
 #@ISA = qw(Exporter);
 @ISA = ();
 
-$VERSION = "0.22";
+$VERSION = "0.23";
 
 =head1 NAME
 
index 4e5495b..f80dfbc 100644 (file)
@@ -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',
index c57d874..b04de25 100644 (file)
--- 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 (file)
index 0000000..78818c1
--- /dev/null
@@ -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 (file)
index 0000000..93fcf4a
--- /dev/null
@@ -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 (file)
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 (file)
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):
-