From: Rafael Kitover Date: Thu, 6 Sep 2012 16:39:17 +0000 (-0400) Subject: author dep on POD test modules, check in 02pod.t X-Git-Tag: 0.07032~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a04e5e2cd5adbde04100b3cb0900ba75adc75f99;p=dbsrgits%2FDBIx-Class-Schema-Loader.git author dep on POD test modules, check in 02pod.t Use ::Optional::Dependencies for POD testing modules, so that they are author deps and the minimum required version of Pod::Simple (3.22, which checks that the correct =encoding is set) is also used. --- diff --git a/lib/DBIx/Class/Schema/Loader/Optional/Dependencies.pm b/lib/DBIx/Class/Schema/Loader/Optional/Dependencies.pm index 8bd275e..3569573 100644 --- a/lib/DBIx/Class/Schema/Loader/Optional/Dependencies.pm +++ b/lib/DBIx/Class/Schema/Loader/Optional/Dependencies.pm @@ -51,6 +51,17 @@ my $reqs = { desc => 'Modules required for using testing using a config file with dbicdump', }, }, + + test_pod => { + req => { + 'Test::Pod' => '1.14', + 'Pod::Simple' => '3.22', + }, + pod => { + title => 'POD testing', + desc => 'Modules required for testing POD in this distribution', + }, + }, }; sub req_list_for { diff --git a/t/02pod.t b/t/02pod.t index ddc2905..8d99a66 100644 --- a/t/02pod.t +++ b/t/02pod.t @@ -1,6 +1,20 @@ +#!perl + +use strict; +use warnings; + use Test::More; -eval "use Test::Pod 1.14"; -plan skip_all => 'Test::Pod 1.14 required' if $@; +BEGIN { + use DBIx::Class::Schema::Loader::Optional::Dependencies (); + if (DBIx::Class::Schema::Loader::Optional::Dependencies->req_ok_for('test_pod')) { + Test::Pod->import; + } + else { + plan skip_all => 'Tests needs ' . DBIx::Class::Schema::Loader::Optional::Dependencies->req_missing_for('test_pod') + } +} all_pod_files_ok(); + +# vim:tw=0 sw=4 et sts=4: