[libmoosex-has-sugar-perl] 09/29: Remove Test::Requires dependency but do the same thing
Intrigeri
intrigeri at moszumanska.debian.org
Wed Aug 27 21:35:22 UTC 2014
This is an automated email from the git hooks/post-receive script.
intrigeri pushed a commit to annotated tag 1.000000-source
in repository libmoosex-has-sugar-perl.
commit 891cde1c6e6a451456fa79f6005dde44a440d96e
Author: Kent Fredric <kentfredric at gmail.com>
Date: Fri Jan 31 06:36:04 2014 +1300
Remove Test::Requires dependency but do the same thing
---
t/10_saccharin.t | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/t/10_saccharin.t b/t/10_saccharin.t
index bac98eb..b61d4e2 100644
--- a/t/10_saccharin.t
+++ b/t/10_saccharin.t
@@ -3,7 +3,23 @@ use strict;
use warnings;
use Test::More;
-use Test::Requires 'MooseX::Types::Moose';
+
+BEGIN {
+ my $mod = 'MooseX::Types::Moose';
+ eval 'require $mod; 1';
+ if ( my $e = $@ ) {
+ my $msg = "$e";
+ if ( $e =~ /^Can't locate/ ) {
+ $msg = "Test requires module '$mod' but it's not found";
+ }
+ if ( $ENV{RELEASE_TESTING} ) {
+ BAIL_OUT($msg);
+ }
+ else {
+ plan skip_all => $msg;
+ }
+ }
+}
use Test::Fatal;
use lib "t/lib";
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmoosex-has-sugar-perl.git
More information about the Pkg-perl-cvs-commits
mailing list