From: skaufman Date: Wed, 13 Aug 2014 15:10:52 +0000 (+0100) Subject: add compile test X-Git-Tag: v1.001022_01~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5101f4dd8feed978e009218b9f9e19927562449d;p=dbsrgits%2FDBIx-Class-Fixtures.git add compile test --- diff --git a/t/compile.t b/t/compile.t new file mode 100644 index 0000000..05ffd87 --- /dev/null +++ b/t/compile.t @@ -0,0 +1,24 @@ +use strict; +use warnings FATAL => 'all'; +use Test::Compile::Internal; +use Test::More; +use Module::Runtime qw[ use_module ]; +use FindBin; +use lib "$FindBin::Bin/../lib"; +use lib "$FindBin::Bin/../SocialFlow-Web-Config/lib"; + +BEGIN { + use FindBin; + $ENV{SOCIALFLOW_TEMPLATE_PATH} = "$FindBin::Bin/../root/templates"; +}; + +my @pms = Test::Compile::Internal->all_pm_files("lib"); + +plan tests => 0+@pms; + +for my $pm (@pms) { + $pm =~ s!(^lib/|\.pm$)!!g; + $pm =~ s|/|::|g; + ok use_module($pm),$pm; + $pm->import; +}