From 77657871721a5eeb5e9ae5bd7d13ca7bcebae247 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Thu, 19 Sep 2013 10:42:49 +0200 Subject: [PATCH] Added .travis.yml and have Build.PL exit with non-zero in case of failure --- .travis.yml | 7 +++++++ Build.PL | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..dcbd4a811 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,7 @@ +script: perl ./Build.PL +perl: + - "5.14" + - "5.12" +branches: + only: + - master diff --git a/Build.PL b/Build.PL index 5b87d2999..a544b51e8 100644 --- a/Build.PL +++ b/Build.PL @@ -131,12 +131,14 @@ EOF if ($missing_prereqs) { exit 1; } else { + my $res = 0; if (eval "use App::Prove; 1") { - App::Prove->new->run; + $res = App::Prove->new->run ? 0 : 1; } if (!$gui) { print "If you also want to use the GUI you can now run `perl Build.PL --gui` to install the required modules.\n"; } + exit $res; } __END__