From: Peter Rabbitson Date: Sun, 5 Apr 2015 12:41:56 +0000 (+0200) Subject: Add an explicit DateTime::TimeZone::OlsonDB optdep X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0d1e52803869860b29a06f33afeb4c8f922ba8c9;p=dbsrgits%2FDBIx-Class-Historic.git Add an explicit DateTime::TimeZone::OlsonDB optdep It happens to lazy-load a lot of extra modules, which both hides them from the t/00describe_encironment lister *and* messes with preforking. --- diff --git a/lib/DBIx/Class/Optional/Dependencies.pm b/lib/DBIx/Class/Optional/Dependencies.pm index 6c71877..4f71084 100644 --- a/lib/DBIx/Class/Optional/Dependencies.pm +++ b/lib/DBIx/Class/Optional/Dependencies.pm @@ -136,6 +136,7 @@ my $dbic_reqs = { icdt => { req => { 'DateTime' => '0.55', + 'DateTime::TimeZone::OlsonDB' => 0, }, pod => { title => 'InflateColumn::DateTime support', diff --git a/xt/extra/internals/optional_deps.t b/xt/extra/internals/optional_deps.t index c0ffb74..15e9f66 100644 --- a/xt/extra/internals/optional_deps.t +++ b/xt/extra/internals/optional_deps.t @@ -193,12 +193,14 @@ is_deeply ( ); # ICDT augmentation + my %expected_icdt_base = ( DateTime => '0.55', 'DateTime::TimeZone::OlsonDB' => 0 ); + my $mysql_icdt = [shuffle qw( test_rdbms_mysql icdt )]; is_deeply( DBIx::Class::Optional::Dependencies->modreq_list_for($mysql_icdt), { - 'DateTime' => '0.55', + %expected_icdt_base, 'DBD::mysql' => 0, 'DateTime::Format::MySQL' => 0, }, @@ -207,15 +209,13 @@ is_deeply ( is_deeply( DBIx::Class::Optional::Dependencies->req_list_for($mysql_icdt), - { - 'DateTime' => '0.55', - }, + \%expected_icdt_base, 'optional dependencies list for testing ICDT MySQL without envvar', ); is( DBIx::Class::Optional::Dependencies->req_missing_for($mysql_icdt), - 'DateTime~0.55 DateTime::Format::MySQL DBD::mysql as well as the following group(s) of environment variables: DBICTEST_MYSQL_DSN/..._USER/..._PASS', + "DateTime~0.55 DateTime::Format::MySQL DateTime::TimeZone::OlsonDB DBD::mysql as well as the following group(s) of environment variables: DBICTEST_MYSQL_DSN/..._USER/..._PASS", 'missing optional dependencies for testing ICDT MySQL without envvars' ); @@ -225,13 +225,13 @@ is_deeply ( my $msaccess_mssql_icdt = [ shuffle qw( test_rdbms_msaccess_odbc test_rdbms_mssql_odbc icdt ) ]; is_deeply( DBIx::Class::Optional::Dependencies->req_missing_for($msaccess_mssql_icdt), - 'Data::GUID DateTime~0.55 DateTime::Format::Strptime~1.2 DBD::ODBC as well as the following group(s) of environment variables: DBICTEST_MSACCESS_ODBC_DSN/..._USER/..._PASS', + 'Data::GUID DateTime~0.55 DateTime::Format::Strptime~1.2 DateTime::TimeZone::OlsonDB DBD::ODBC as well as the following group(s) of environment variables: DBICTEST_MSACCESS_ODBC_DSN/..._USER/..._PASS', 'Correct req_missing_for on multi-level converging include', ); is_deeply( DBIx::Class::Optional::Dependencies->modreq_missing_for($msaccess_mssql_icdt), - 'Data::GUID DateTime~0.55 DateTime::Format::Strptime~1.2 DBD::ODBC', + 'Data::GUID DateTime~0.55 DateTime::Format::Strptime~1.2 DateTime::TimeZone::OlsonDB DBD::ODBC', 'Correct modreq_missing_for on multi-level converging include', ); @@ -239,8 +239,8 @@ is_deeply ( DBIx::Class::Optional::Dependencies->req_list_for($msaccess_mssql_icdt), { 'DBD::ODBC' => 0, - 'DateTime' => '0.55', 'DateTime::Format::Strptime' => '1.2', + %expected_icdt_base, }, 'Correct req_list_for on multi-level converging include', ); @@ -250,8 +250,8 @@ is_deeply ( { 'DBD::ODBC' => 0, 'Data::GUID' => 0, - 'DateTime' => '0.55', 'DateTime::Format::Strptime' => '1.2', + %expected_icdt_base, }, 'Correct modreq_list_for on multi-level converging include', );