[Bast-commits] r3483 - in branches/DBIx-Class-Schema-Loader/current: . lib/DBIx/Class/Schema lib/DBIx/Class/Schema/Loader lib/DBIx/Class/Schema/Loader/DBI

blblack at dev.catalyst.perl.org blblack at dev.catalyst.perl.org
Fri Jun 8 02:13:43 GMT 2007


Author: blblack
Date: 2007-06-08 02:13:41 +0100 (Fri, 08 Jun 2007)
New Revision: 3483

Modified:
   branches/DBIx-Class-Schema-Loader/current/
   branches/DBIx-Class-Schema-Loader/current/Changes
   branches/DBIx-Class-Schema-Loader/current/Makefile.PL
   branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader.pm
   branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/Base.pm
   branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI.pm
   branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/DB2.pm
   branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm
   branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm
   branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/SQLite.pm
   branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/Writing.pm
   branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm
   branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/RelBuilder.pm
Log:
 r32211 at brandon-blacks-computer (orig r3481):  blblack | 2007-06-07 20:11:22 -0500
 update versions for 0.04000 release, added some better feature stuff to Makefile.PL



Property changes on: branches/DBIx-Class-Schema-Loader/current
___________________________________________________________________
Name: svk:merge
   - bd8105ee-0ff8-0310-8827-fb3f25b6796d:/trunk/DBIx-Class-Schema-Loader:3359
   + bd8105ee-0ff8-0310-8827-fb3f25b6796d:/trunk/DBIx-Class-Schema-Loader:3481

Modified: branches/DBIx-Class-Schema-Loader/current/Changes
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/Changes	2007-06-08 01:13:02 UTC (rev 3482)
+++ branches/DBIx-Class-Schema-Loader/current/Changes	2007-06-08 01:13:41 UTC (rev 3483)
@@ -1,5 +1,9 @@
 Revision history for Perl extension DBIx::Class::Schema::Loader
 
+0.04000 Thu Jun 7, 2007
+        - Added some env vars for controlling the Makefile.PL feature
+          questions, to make automation easier.
+
 0.03999_02 Tue May 22, 2007
         - Converted to Module::Install
 

Modified: branches/DBIx-Class-Schema-Loader/current/Makefile.PL
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/Makefile.PL	2007-06-08 01:13:02 UTC (rev 3482)
+++ branches/DBIx-Class-Schema-Loader/current/Makefile.PL	2007-06-08 01:13:41 UTC (rev 3483)
@@ -1,5 +1,5 @@
 
-use inc::Module::Install;
+use inc::Module::Install 0.65;
 
 name           'DBIx-Class-Schema-Loader';
 all_from       'lib/DBIx/Class/Schema/Loader.pm';
@@ -23,30 +23,76 @@
 requires 'Class::Inspector'            => 0;
 requires 'DBIx::Class'                 => '0.07006';
 
-feature 'SQLite Support' =>
-    -default      => $ENV{DBIC_FEATURE_SQLITE} || 0,
-    'DBI'         => '1.56',
-    'DBD::SQLite' => '1.12';
+# This is my manual hack for better feature control
+#  If you want to change the default answer for a feature,
+#  set the appropriate environment variable, like
+#  DBIC_FEATURE_MYSQL.  If you want the defaults to
+#  apply automatically without asking any questions,
+#  set DBIC_FEATURE_NOQUESTIONS.  Hopefully this will
+#  save someone some pain when trying to automate
+#  the installation of this software.
 
-feature 'MySQL Support' =>
-    -default      => $ENV{DBIC_FEATURE_MYSQL} || 0,
-    'DBI'         => '1.56',
-    'DBD::mysql'  => '4.004';
+# Maintainer shouldn't set these, as they would affect
+# the META.yml shipped to CPAN.
 
-feature 'PostgreSQL Support' =>
-    -default      => $ENV{DBIC_FEATURE_PG} || 0,
-    'DBI'         => '1.56',
-    'DBD::Pg'     => '1.49'; # Soon to be 1.50
+my $_features = [
+    SQLITE => {
+        label => 'SQLite Support',
+        def   => $ENV{DBIC_FEATURE_SQLITE} || 0,
+        deps  => [
+            'DBI'         => '1.56',
+            'DBD::SQLite' => '1.12',
+        ],
+    },
+    MYSQL => {
+        label => 'MySQL Support',
+        def   => $ENV{DBIC_FEATURE_MYSQL} || 0,
+        deps  => [
+            'DBI'         => '1.56',
+            'DBD::mysql'  => '4.004',
+        ],
+    },
+    PG => {
+        label => 'PostgreSQL Support',
+        def   => $ENV{DBIC_FEATURE_PG} || 0,
+        deps  => [
+            'DBI'         => '1.56',
+            'DBD::Pg'     => '1.49', # Soon to be 1.50
+        ],
+    },
+    DB2 => {
+        label => 'DB2 Support',
+        def   => $ENV{DBIC_FEATURE_DB2} || 0,
+        deps  => [
+            'DBI'         => '1.56',
+            'DBD::DB2'    => '1.0',
+        ],
+    },
+    ORACLE => {
+        label => 'Oracle Support (experimental)',
+        def   => $ENV{DBIC_FEATURE_ORACLE} || 0,
+        deps  => [
+            'DBI'         => '1.56',
+            'DBD::Oracle' => '0.19',
+        ],
+    },
+];
 
-feature 'DB2 Support' =>
-    -default      => $ENV{DBIC_FEATURE_DB2} || 0,
-    'DBI'         => '1.56',
-    'DBD::DB2'    => '1.0';
+for(my $i = 0; $i <= $#$_features - 1; $i += 2) {
+    my $name = $_features->[$i];
+    my $attrs = $_features->[$i+1];
 
-feature 'Oracle Support (*experimental*)' =>
-    -default      => $ENV{DBIC_FEATURE_ORACLE} || 0,
-    'DBI'         => '1.56',
-    'DBD::Oracle' => '0.19';
+    if($ENV{DBIC_FEATURE_NOQUESTIONS}) {
+        if($attrs->{def}) {
+            requires @{$attrs->{deps}};
+        }
+    }
+    else {
+        feature $attrs->{label} =>
+            -default => $attrs->{def},
+            @{$attrs->{deps}};
+    }
+}
 
 # Rebuild README for maintainers
 if(-e 'MANIFEST.SKIP') {

Modified: branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/Base.pm
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/Base.pm	2007-06-08 01:13:02 UTC (rev 3482)
+++ branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/Base.pm	2007-06-08 01:13:41 UTC (rev 3483)
@@ -14,7 +14,7 @@
 use Digest::MD5 qw//;
 require DBIx::Class;
 
-our $VERSION = '0.03999_02';
+our $VERSION = '0.04000';
 
 __PACKAGE__->mk_ro_accessors(qw/
                                 schema

Modified: branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/DB2.pm
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/DB2.pm	2007-06-08 01:13:02 UTC (rev 3482)
+++ branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/DB2.pm	2007-06-08 01:13:41 UTC (rev 3483)
@@ -6,7 +6,7 @@
 use Carp::Clan qw/^DBIx::Class/;
 use Class::C3;
 
-our $VERSION = '0.03999_02';
+our $VERSION = '0.04000';
 
 =head1 NAME
 

Modified: branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm	2007-06-08 01:13:02 UTC (rev 3482)
+++ branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm	2007-06-08 01:13:41 UTC (rev 3483)
@@ -6,7 +6,7 @@
 use Carp::Clan qw/^DBIx::Class/;
 use Class::C3;
 
-our $VERSION = '0.03999_02';
+our $VERSION = '0.04000';
 
 =head1 NAME
 

Modified: branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm	2007-06-08 01:13:02 UTC (rev 3482)
+++ branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm	2007-06-08 01:13:41 UTC (rev 3483)
@@ -6,7 +6,7 @@
 use Carp::Clan qw/^DBIx::Class/;
 use Class::C3;
 
-our $VERSION = '0.03999_02';
+our $VERSION = '0.04000';
 
 =head1 NAME
 

Modified: branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/SQLite.pm
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/SQLite.pm	2007-06-08 01:13:02 UTC (rev 3482)
+++ branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/SQLite.pm	2007-06-08 01:13:41 UTC (rev 3483)
@@ -7,7 +7,7 @@
 use Text::Balanced qw( extract_bracketed );
 use Class::C3;
 
-our $VERSION = '0.03999_02';
+our $VERSION = '0.04000';
 
 =head1 NAME
 

Modified: branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/Writing.pm
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/Writing.pm	2007-06-08 01:13:02 UTC (rev 3482)
+++ branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/Writing.pm	2007-06-08 01:13:41 UTC (rev 3483)
@@ -1,7 +1,7 @@
 package DBIx::Class::Schema::Loader::DBI::Writing;
 use strict;
 
-our $VERSION = '0.03999_02';
+our $VERSION = '0.04000';
 
 # Empty. POD only.
 

Modified: branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm	2007-06-08 01:13:02 UTC (rev 3482)
+++ branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm	2007-06-08 01:13:41 UTC (rev 3483)
@@ -6,7 +6,7 @@
 use Carp::Clan qw/^DBIx::Class/;
 use Class::C3;
 
-our $VERSION = '0.03999_02';
+our $VERSION = '0.04000';
 
 =head1 NAME
 

Modified: branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI.pm
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI.pm	2007-06-08 01:13:02 UTC (rev 3482)
+++ branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI.pm	2007-06-08 01:13:41 UTC (rev 3483)
@@ -7,7 +7,7 @@
 use Carp::Clan qw/^DBIx::Class/;
 use UNIVERSAL::require;
 
-our $VERSION = '0.03999_02';
+our $VERSION = '0.04000';
 
 =head1 NAME
 

Modified: branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/RelBuilder.pm
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/RelBuilder.pm	2007-06-08 01:13:02 UTC (rev 3482)
+++ branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/RelBuilder.pm	2007-06-08 01:13:41 UTC (rev 3483)
@@ -5,7 +5,7 @@
 use Carp::Clan qw/^DBIx::Class/;
 use Lingua::EN::Inflect::Number ();
 
-our $VERSION = '0.03999_02';
+our $VERSION = '0.04000';
 
 =head1 NAME
 

Modified: branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader.pm
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader.pm	2007-06-08 01:13:02 UTC (rev 3482)
+++ branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader.pm	2007-06-08 01:13:41 UTC (rev 3483)
@@ -11,7 +11,7 @@
 # Always remember to do all digits for the version even if they're 0
 # i.e. first release of 0.XX *must* be 0.XX000. This avoids fBSD ports
 # brain damage and presumably various other packaging systems too
-our $VERSION = '0.03999_02';
+our $VERSION = '0.04000';
 
 __PACKAGE__->mk_classaccessor('_loader_args' => {});
 __PACKAGE__->mk_classaccessors(qw/dump_to_dir _loader_invoked _loader/);




More information about the Bast-commits mailing list