15 changes: 14 additions & 1 deletion maint/travis-ci_scripts/common.bash
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ extract_prereqs() {
s/^\!.*//;
s/^[^a-z]+//i;
s/\-[^\-]+$/ /; # strip version part
s/\-/::/g
s/\-/::/g;
s/^\s*Snowball::Swedish\s*$/ Lingua::Stem::Snowball::Se /m; # distro->module
s/^\s*Snowball::Norwegian\s*$/ Lingua::Stem::Snowball::No /m;
s/^\s*Scalar::List::Utils\s*$/ List::Util /m;
' <<< "$OUT")

# throw away what was in $@
Expand All @@ -127,6 +130,16 @@ extract_prereqs() {
echo "$PQ"
}

listalldeps() {
# relies on sorted YAML
perl -lne '
next unless /^((?:build_)?requires:)/..($_ ne $1 and /^[^ ]/);
next if /^[^ ]/ or /^ *perl:/; # drop requires headers, or perl
s/^ *([^ ]*): .*/$1/;
print;
' MYMETA.yml
}

parallel_installdeps_notest() {
if [[ -z "$@" ]] ; then return; fi

Expand Down
13 changes: 13 additions & 0 deletions xt/optdep-pod.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
use warnings;
use strict;

use Test::More;

ok -f 'lib/DBIx/Class/Schema/Loader/Optional/Dependencies.pod', 'optdep pod present';
cmp_ok
-M 'lib/DBIx/Class/Schema/Loader/Optional/Dependencies.pod' || 2 ** 15,
'<',
-M 'lib/DBIx/Class/Schema/Loader/Optional/Dependencies.pm',
'optdep pod newer than pm';

done_testing;