Skip to content

Commit

Permalink
Add an explicit DateTime::TimeZone::OlsonDB optdep
Browse files Browse the repository at this point in the history
It happens to lazy-load a lot of extra modules, which both hides them from the
t/00describe_encironment lister *and* messes with preforking.
  • Loading branch information
ribasushi committed Aug 12, 2015
1 parent 7562528 commit d437f66
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
1 change: 1 addition & 0 deletions lib/DBIx/Class/Optional/Dependencies.pm
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ my $dbic_reqs = {
ic_dt => {
req => {
'DateTime' => '0.55',
'DateTime::TimeZone::OlsonDB' => 0,
},
pod => {
title => 'InflateColumn::DateTime support',
Expand Down
16 changes: 7 additions & 9 deletions xt/extra/internals/optional_deps.t
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ is_deeply (
is_deeply(
DBIx::Class::Optional::Dependencies->modreq_list_for($mysql_icdt),
{
'DateTime' => '0.55',
%expected_icdt_base,
'DBD::mysql' => 0,
'DateTime::Format::MySQL' => 0,
},
Expand All @@ -209,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'
);

Expand All @@ -227,22 +225,22 @@ is_deeply (
my $msaccess_mssql_icdt = [ shuffle qw( test_rdbms_msaccess_odbc test_rdbms_mssql_odbc ic_dt ) ];
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',
);

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',
);
Expand All @@ -252,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',
);
Expand Down

0 comments on commit d437f66

Please sign in to comment.