From: Brandon Black Date: Fri, 8 Jun 2007 01:11:22 +0000 (+0000) Subject: update versions for 0.04000 release, added some better feature stuff to Makefile.PL X-Git-Tag: 0.04000^0 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7507c8ce0703993b79b31bf90144e28ef97d4a9d;p=dbsrgits%2FDBIx-Class-Schema-Loader.git update versions for 0.04000 release, added some better feature stuff to Makefile.PL --- diff --git a/Changes b/Changes index 1cb6660..2cdd181 100644 --- a/Changes +++ b/Changes @@ -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 diff --git a/Makefile.PL b/Makefile.PL index 33e38f1..d664274 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -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 'Carp::Clan' => 0; 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'; - -feature 'MySQL Support' => - -default => $ENV{DBIC_FEATURE_MYSQL} || 0, - 'DBI' => '1.56', - 'DBD::mysql' => '4.004'; - -feature 'PostgreSQL Support' => - -default => $ENV{DBIC_FEATURE_PG} || 0, - 'DBI' => '1.56', - 'DBD::Pg' => '1.49'; # Soon to be 1.50 - -feature 'DB2 Support' => - -default => $ENV{DBIC_FEATURE_DB2} || 0, - 'DBI' => '1.56', - 'DBD::DB2' => '1.0'; - -feature 'Oracle Support (*experimental*)' => - -default => $ENV{DBIC_FEATURE_ORACLE} || 0, - 'DBI' => '1.56', - 'DBD::Oracle' => '0.19'; +# 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. + +# Maintainer shouldn't set these, as they would affect +# the META.yml shipped to CPAN. + +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', + ], + }, +]; + +for(my $i = 0; $i <= $#$_features - 1; $i += 2) { + my $name = $_features->[$i]; + my $attrs = $_features->[$i+1]; + + 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') { diff --git a/lib/DBIx/Class/Schema/Loader.pm b/lib/DBIx/Class/Schema/Loader.pm index b3a3187..6467971 100644 --- a/lib/DBIx/Class/Schema/Loader.pm +++ b/lib/DBIx/Class/Schema/Loader.pm @@ -11,7 +11,7 @@ use Scalar::Util qw/ weaken /; # 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/); diff --git a/lib/DBIx/Class/Schema/Loader/Base.pm b/lib/DBIx/Class/Schema/Loader/Base.pm index b617697..66736b3 100644 --- a/lib/DBIx/Class/Schema/Loader/Base.pm +++ b/lib/DBIx/Class/Schema/Loader/Base.pm @@ -14,7 +14,7 @@ use Cwd qw//; use Digest::MD5 qw//; require DBIx::Class; -our $VERSION = '0.03999_02'; +our $VERSION = '0.04000'; __PACKAGE__->mk_ro_accessors(qw/ schema diff --git a/lib/DBIx/Class/Schema/Loader/DBI.pm b/lib/DBIx/Class/Schema/Loader/DBI.pm index fa34e1b..2c21e11 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI.pm @@ -7,7 +7,7 @@ use Class::C3; use Carp::Clan qw/^DBIx::Class/; use UNIVERSAL::require; -our $VERSION = '0.03999_02'; +our $VERSION = '0.04000'; =head1 NAME diff --git a/lib/DBIx/Class/Schema/Loader/DBI/DB2.pm b/lib/DBIx/Class/Schema/Loader/DBI/DB2.pm index f3f75bf..a407a5d 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/DB2.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/DB2.pm @@ -6,7 +6,7 @@ use base 'DBIx::Class::Schema::Loader::DBI'; use Carp::Clan qw/^DBIx::Class/; use Class::C3; -our $VERSION = '0.03999_02'; +our $VERSION = '0.04000'; =head1 NAME diff --git a/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm b/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm index a8e6581..12356ea 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm @@ -6,7 +6,7 @@ use base 'DBIx::Class::Schema::Loader::DBI'; use Carp::Clan qw/^DBIx::Class/; use Class::C3; -our $VERSION = '0.03999_02'; +our $VERSION = '0.04000'; =head1 NAME diff --git a/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm b/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm index 515e5ce..2042b30 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm @@ -6,7 +6,7 @@ use base 'DBIx::Class::Schema::Loader::DBI'; use Carp::Clan qw/^DBIx::Class/; use Class::C3; -our $VERSION = '0.03999_02'; +our $VERSION = '0.04000'; =head1 NAME diff --git a/lib/DBIx/Class/Schema/Loader/DBI/SQLite.pm b/lib/DBIx/Class/Schema/Loader/DBI/SQLite.pm index 98c467e..2e6696c 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/SQLite.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/SQLite.pm @@ -7,7 +7,7 @@ use Carp::Clan qw/^DBIx::Class/; use Text::Balanced qw( extract_bracketed ); use Class::C3; -our $VERSION = '0.03999_02'; +our $VERSION = '0.04000'; =head1 NAME diff --git a/lib/DBIx/Class/Schema/Loader/DBI/Writing.pm b/lib/DBIx/Class/Schema/Loader/DBI/Writing.pm index 6cb7204..02cd26d 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/Writing.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/Writing.pm @@ -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. diff --git a/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm b/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm index 62883a9..e377feb 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm @@ -6,7 +6,7 @@ use base 'DBIx::Class::Schema::Loader::DBI'; use Carp::Clan qw/^DBIx::Class/; use Class::C3; -our $VERSION = '0.03999_02'; +our $VERSION = '0.04000'; =head1 NAME diff --git a/lib/DBIx/Class/Schema/Loader/RelBuilder.pm b/lib/DBIx/Class/Schema/Loader/RelBuilder.pm index f011484..d9f8740 100644 --- a/lib/DBIx/Class/Schema/Loader/RelBuilder.pm +++ b/lib/DBIx/Class/Schema/Loader/RelBuilder.pm @@ -5,7 +5,7 @@ use warnings; use Carp::Clan qw/^DBIx::Class/; use Lingua::EN::Inflect::Number (); -our $VERSION = '0.03999_02'; +our $VERSION = '0.04000'; =head1 NAME