[libmoosex-has-sugar-perl] 34/120: Tidy script.pl{
Intrigeri
intrigeri at moszumanska.debian.org
Wed Aug 27 21:35:08 UTC 2014
This is an automated email from the git hooks/post-receive script.
intrigeri pushed a commit to annotated tag 0.05070422-source
in repository libmoosex-has-sugar-perl.
commit fa0e9df6e22a6e12a2f45c7138772c220de2a37f
Author: Kent Fredric <kentfredric at gmail.com>
Date: Thu Oct 24 06:36:39 2013 +1300
Tidy script.pl{
---
script.pl | 43 ++++++++++++++++++++++---------------------
1 file changed, 22 insertions(+), 21 deletions(-)
diff --git a/script.pl b/script.pl
index d3cbec7..64a7b0f 100644
--- a/script.pl
+++ b/script.pl
@@ -6,8 +6,8 @@ use utf8;
sub diag { print STDERR @_; print STDERR "\n" }
sub env_exists { return exists $ENV{ $_[0] } }
-sub env_true { return env_exists( $_[0] ) and $ENV{ $_[0] } }
-sub env_is { return env_exists($_[0]) and $ENV{$_[0]} eq $_[1] }
+sub env_true { return env_exists( $_[0] ) and $ENV{ $_[0] } }
+sub env_is { return env_exists( $_[0] ) and $ENV{ $_[0] } eq $_[1] }
sub safe_exec_nonfatal {
my ( $command, @params ) = @_;
@@ -31,8 +31,8 @@ sub safe_exec_nonfatal {
sub safe_exec {
my ( $command, @params ) = @_;
my $exit_code = safe_exec_nonfatal( $command, @params );
- if ( $exit_code != 0 ){
- exit $exit_code;
+ if ( $exit_code != 0 ) {
+ exit $exit_code;
}
return 1;
}
@@ -42,21 +42,22 @@ if ( not env_exists('TRAVIS') ) {
exit 1;
}
-if ( env_is('TRAVIS_BRANCH', 'master' ) ) {
- my $xtest = safe_exec_nonfatal('dzil','xtest');
- my $test = safe_exec_nonfatal('dzil','test');
- if ( $test != 0) {
- exit $test;
- }
- if ( $xtest != 0 ){
- exit $xtest;
- }
- exit 0;
-} else {
- my @paths = './t';
-
- if ( env_true('AUTHOR_TESTING') or env_true('RELEASE_TESTING') ) {
- push @paths, './xt';
- }
- safe_exec( 'prove', '--blib', '--shuffle', '--color', '--recurse', '--timer', '--jobs', 30, @paths );
+if ( env_is( 'TRAVIS_BRANCH', 'master' ) ) {
+ my $xtest = safe_exec_nonfatal( 'dzil', 'xtest' );
+ my $test = safe_exec_nonfatal( 'dzil', 'test' );
+ if ( $test != 0 ) {
+ exit $test;
+ }
+ if ( $xtest != 0 ) {
+ exit $xtest;
+ }
+ exit 0;
+}
+else {
+ my @paths = './t';
+
+ if ( env_true('AUTHOR_TESTING') or env_true('RELEASE_TESTING') ) {
+ push @paths, './xt';
+ }
+ safe_exec( 'prove', '--blib', '--shuffle', '--color', '--recurse', '--timer', '--jobs', 30, @paths );
}
--
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