[Bast-commits] r9544 - in DBIx-Class/0.08/trunk: . t/lib/DBICTest
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Wed Jun 2 10:44:59 GMT 2010
Author: ribasushi
Date: 2010-06-02 11:44:59 +0100 (Wed, 02 Jun 2010)
New Revision: 9544
Modified:
DBIx-Class/0.08/trunk/Changes
DBIx-Class/0.08/trunk/Makefile.PL
DBIx-Class/0.08/trunk/t/lib/DBICTest/AuthorCheck.pm
Log:
Relax developer policy, allowing to skip optional dependencies when in a checkout
Modified: DBIx-Class/0.08/trunk/Changes
===================================================================
--- DBIx-Class/0.08/trunk/Changes 2010-06-02 10:43:30 UTC (rev 9543)
+++ DBIx-Class/0.08/trunk/Changes 2010-06-02 10:44:59 UTC (rev 9544)
@@ -53,8 +53,11 @@
connect() attributes to e.g. Schema::Versioned
* Misc
- - Add a warning to load_namespaces if a class in ResultSet/
- is not a subclass of DBIx::Class::ResultSet
+ - Reformatted Changelog \o/
+ - Allow developers to skip optional dependency forcing when working
+ from a checkout
+ - Add a warning to load_namespaces if a class in ResultSet/ is not
+ a subclass of DBIx::Class::ResultSet
- All DBIC exception-handling switched to Try::Tiny
- Depend on optimized SQL::Abstract (faster SQL generation)
Modified: DBIx-Class/0.08/trunk/Makefile.PL
===================================================================
--- DBIx-Class/0.08/trunk/Makefile.PL 2010-06-02 10:43:30 UTC (rev 9543)
+++ DBIx-Class/0.08/trunk/Makefile.PL 2010-06-02 10:44:59 UTC (rev 9544)
@@ -12,6 +12,14 @@
use Config;
$ENV{PERL5LIB} = join ($Config{path_sep}, @INC);
+use Getopt::Long qw/:config gnu_getopt bundling_override no_ignore_case pass_through/;
+my $args = {
+ skip_author_deps => undef,
+};
+GetOptions ($args, 'skip_author_deps');
+if (@ARGV) {
+ warn "\nIgnoring unrecognized option(s): @ARGV\n\n";
+}
###
### DO NOT ADD OPTIONAL DEPENDENCIES HERE, EVEN AS recommends()
@@ -64,23 +72,45 @@
# require extra modules for testing if we're in a checkout
+my $optdep_msg;
if ($Module::Install::AUTHOR) {
- warn <<'EOW';
+ if ($args->{skip_author_deps}) {
+ $optdep_msg = <<'EOW';
+
******************************************************************************
******************************************************************************
*** ***
+*** IGNORING AUTHOR MODE: no optional test dependencies will be forced. ***
+*** ***
+*** If you are using this checkout with the intention of submitting a DBIC ***
+*** patch, you are *STRONGLY ENCOURAGED* to install all dependencies, so ***
+*** that every possible unit-test will run. ***
+*** ***
+******************************************************************************
+******************************************************************************
+
+EOW
+ }
+ else {
+ $optdep_msg = <<'EOW';
+
+******************************************************************************
+******************************************************************************
+*** ***
*** AUTHOR MODE: all optional test dependencies converted to hard requires ***
+*** ( to disabled re-run Makefile.PL with --skip_author_deps ) ***
*** ***
******************************************************************************
******************************************************************************
EOW
- require DBIx::Class::Optional::Dependencies;
- $reqs->{test_requires} = {
- %{$reqs->{test_requires}},
- map { %$_ } (values %{DBIx::Class::Optional::Dependencies->req_group_list}),
- };
+ require DBIx::Class::Optional::Dependencies;
+ $reqs->{test_requires} = {
+ %{$reqs->{test_requires}},
+ map { %$_ } (values %{DBIx::Class::Optional::Dependencies->req_group_list}),
+ };
+ }
}
# compose final req list, for alphabetical ordering
@@ -104,7 +134,10 @@
$rtype->($mod, $ver);
}
+# output twice since the deplist is > 70 lines
+warn $optdep_msg;
auto_install();
+warn $optdep_msg;
# re-create various autogenerated documentation bits
if ($Module::Install::AUTHOR) {
@@ -180,7 +213,7 @@
# Re-write META.yml to _exclude_ all forced requires (we do not want to ship this)
-if ($Module::Install::AUTHOR) {
+if ($Module::Install::AUTHOR && ! $args->{skip_author_deps} ) {
# FIXME test_requires is not yet part of META
my %original_build_requires = ( %$build_requires, %$test_requires );
Modified: DBIx-Class/0.08/trunk/t/lib/DBICTest/AuthorCheck.pm
===================================================================
--- DBIx-Class/0.08/trunk/t/lib/DBICTest/AuthorCheck.pm 2010-06-02 10:43:30 UTC (rev 9543)
+++ DBIx-Class/0.08/trunk/t/lib/DBICTest/AuthorCheck.pm 2010-06-02 10:44:59 UTC (rev 9544)
@@ -66,10 +66,16 @@
We have a number of reasons to believe that this is a development
checkout and that you, the user, did not run `perl Makefile.PL`
before using this code. You absolutely _must_ perform this step,
-and ensure you have all required dependencies present. Not doing
+to ensure you have all required dependencies present. Not doing
so often results in a lot of wasted time for other contributors
trying to assit you with spurious "its broken!" problems.
+By default DBICs Makefile.PL turns all optional dependenciess into
+*HARD REQUIREMENTS*, in order to make sure that the entire test
+suite is executed, and no tests are skipped due to missing modules.
+If you for some reason need to disable this behavior - supply the
+--skip_author_deps option when running perl Makefile.PL
+
If you are seeing this message unexpectedly (i.e. you are in fact
attempting a regular installation be it through CPAN or manually),
please report the situation to either the mailing list or to the
More information about the Bast-commits
mailing list