Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 9 commits
  • 14 files changed
  • 0 commit comments
  • 2 contributors
View
4 Changes
@@ -1,5 +1,9 @@
Revision history for Perl module Alien::Base.
+0.000_012 Apr 29, 2012
+ - Simplified capture mechanism, this should prevent warnings from being suppressed
+ - Check the return status of alien_build, die if necessary
+
0.000_011 Apr 25, 2012
- I'm starting to believe the bug is in the dontpanic library build chain
- Die on more warnings in that build chain. This won't fix anything,
View
22 META.json
@@ -51,43 +51,43 @@
"provides" : {
"Alien::Base" : {
"file" : "lib/Alien/Base.pm",
- "version" : "0.000_011"
+ "version" : "0.000_012"
},
"Alien::Base::ModuleBuild" : {
"file" : "lib/Alien/Base/ModuleBuild.pm",
- "version" : "0.000_011"
+ "version" : "0.000_012"
},
"Alien::Base::ModuleBuild::Cabinet" : {
"file" : "lib/Alien/Base/ModuleBuild/Cabinet.pm",
- "version" : "0.000_011"
+ "version" : "0.000_012"
},
"Alien::Base::ModuleBuild::File" : {
"file" : "lib/Alien/Base/ModuleBuild/File.pm",
- "version" : "0.000_011"
+ "version" : "0.000_012"
},
"Alien::Base::ModuleBuild::Repository" : {
"file" : "lib/Alien/Base/ModuleBuild/Repository.pm",
- "version" : "0.000_011"
+ "version" : "0.000_012"
},
"Alien::Base::ModuleBuild::Repository::FTP" : {
"file" : "lib/Alien/Base/ModuleBuild/Repository/FTP.pm",
- "version" : "0.000_011"
+ "version" : "0.000_012"
},
"Alien::Base::ModuleBuild::Repository::HTTP" : {
"file" : "lib/Alien/Base/ModuleBuild/Repository/HTTP.pm",
- "version" : "0.000_011"
+ "version" : "0.000_012"
},
"Alien::Base::ModuleBuild::Repository::Local" : {
"file" : "lib/Alien/Base/ModuleBuild/Repository/Local.pm",
- "version" : "0.000_011"
+ "version" : "0.000_012"
},
"Alien::Base::ModuleBuild::Utils" : {
"file" : "lib/Alien/Base/ModuleBuild/Utils.pm",
- "version" : "0.000_011"
+ "version" : "0.000_012"
},
"Alien::Base::PkgConfig" : {
"file" : "lib/Alien/Base/PkgConfig.pm",
- "version" : "0.000_011"
+ "version" : "0.000_012"
}
},
"release_status" : "testing",
@@ -102,5 +102,5 @@
"url" : "http://github.com/jberger/Alien-Base"
}
},
- "version" : "0.000_011"
+ "version" : "0.000_012"
}
View
22 META.yml
@@ -21,34 +21,34 @@ no_index:
provides:
Alien::Base:
file: lib/Alien/Base.pm
- version: 0.000_011
+ version: 0.000_012
Alien::Base::ModuleBuild:
file: lib/Alien/Base/ModuleBuild.pm
- version: 0.000_011
+ version: 0.000_012
Alien::Base::ModuleBuild::Cabinet:
file: lib/Alien/Base/ModuleBuild/Cabinet.pm
- version: 0.000_011
+ version: 0.000_012
Alien::Base::ModuleBuild::File:
file: lib/Alien/Base/ModuleBuild/File.pm
- version: 0.000_011
+ version: 0.000_012
Alien::Base::ModuleBuild::Repository:
file: lib/Alien/Base/ModuleBuild/Repository.pm
- version: 0.000_011
+ version: 0.000_012
Alien::Base::ModuleBuild::Repository::FTP:
file: lib/Alien/Base/ModuleBuild/Repository/FTP.pm
- version: 0.000_011
+ version: 0.000_012
Alien::Base::ModuleBuild::Repository::HTTP:
file: lib/Alien/Base/ModuleBuild/Repository/HTTP.pm
- version: 0.000_011
+ version: 0.000_012
Alien::Base::ModuleBuild::Repository::Local:
file: lib/Alien/Base/ModuleBuild/Repository/Local.pm
- version: 0.000_011
+ version: 0.000_012
Alien::Base::ModuleBuild::Utils:
file: lib/Alien/Base/ModuleBuild/Utils.pm
- version: 0.000_011
+ version: 0.000_012
Alien::Base::PkgConfig:
file: lib/Alien/Base/PkgConfig.pm
- version: 0.000_011
+ version: 0.000_012
recommends:
HTML::LinkExtor: 0
requires:
@@ -68,4 +68,4 @@ resources:
bugtracker: http://github.com/jberger/Alien-Base/issues
license: http://dev.perl.org/licenses/
repository: http://github.com/jberger/Alien-Base
-version: 0.000_011
+version: 0.000_012
View
2  lib/Alien/Base.pm
@@ -3,7 +3,7 @@ package Alien::Base;
use strict;
use warnings;
-our $VERSION = '0.000_011';
+our $VERSION = '0.000_012';
$VERSION = eval $VERSION;
use Carp;
View
52 lib/Alien/Base/ModuleBuild.pm
@@ -3,12 +3,12 @@ package Alien::Base::ModuleBuild;
use strict;
use warnings;
-our $VERSION = '0.000_011';
+our $VERSION = '0.000_012';
$VERSION = eval $VERSION;
use parent 'Module::Build';
-use Capture::Tiny qw/capture capture_merged/;
+use Capture::Tiny qw/capture tee/;
use File::chdir;
use File::Spec;
use Carp;
@@ -256,13 +256,9 @@ sub ACTION_alien {
print "Done\n";
print "Building library ... ";
- #TODO capture and log?
- my $build = sub { $self->alien_build };
- my $log;
- if ($Verbose) {
- $build->();
- } else {
- $log = capture_merged { $build->() };
+ unless ($self->alien_build) {
+ print "Failed\n";
+ croak "Build not completed";
}
print "Done\n";
@@ -301,11 +297,6 @@ sub alien_check_installed_version {
my $command = $self->alien_version_check;
my %result = $self->do_system($command);
-
- if ($Verbose and not $result{success}) {
- print "Command '$result{command}' failed with message: $result{stderr}";
- }
-
my $version = $result{stdout} || 0;
return $version;
@@ -349,7 +340,7 @@ sub alien_build {
}
# wrapper for M::B::do_system which interpolates alien_ vars first
-# also captures output if called in list context (returning a hash)
+# futher it either captures or tees depending on the value of $Verbose
sub do_system {
my $self = shift;
@@ -359,26 +350,23 @@ sub do_system {
my @args = map { $self->alien_interpolate($_) } @_;
- # list context
- if (wantarray) {
- my ($out, $err, $success) = capture { $self->SUPER::do_system(@args) };
- my %return = (
- stdout => $out,
- stderr => $err,
- success => $success,
- command => join(' ', @args),
- );
-
- # restore wd
- $CWD = $initial_cwd;
- return %return;
- }
+ my ($out, $err, $success) =
+ $Verbose
+ ? tee { $self->SUPER::do_system(@args) }
+ : capture { $self->SUPER::do_system(@args) }
+ ;
+
+ my %return = (
+ stdout => $out,
+ stderr => $err,
+ success => $success,
+ command => join(' ', @args),
+ );
- # scalar context
- my $status = $self->SUPER::do_system(@args);
# restore wd
$CWD = $initial_cwd;
- return $status;
+
+ return wantarray ? %return : $return{success};
}
sub alien_interpolate {
View
2  lib/Alien/Base/ModuleBuild/Cabinet.pm
@@ -3,7 +3,7 @@ package Alien::Base::ModuleBuild::Cabinet;
use strict;
use warnings;
-our $VERSION = '0.000_011';
+our $VERSION = '0.000_012';
$VERSION = eval $VERSION;
use Sort::Versions;
View
2  lib/Alien/Base/ModuleBuild/File.pm
@@ -3,7 +3,7 @@ package Alien::Base::ModuleBuild::File;
use strict;
use warnings;
-our $VERSION = '0.000_011';
+our $VERSION = '0.000_012';
$VERSION = eval $VERSION;
sub new {
View
2  lib/Alien/Base/ModuleBuild/Repository.pm
@@ -3,7 +3,7 @@ package Alien::Base::ModuleBuild::Repository;
use strict;
use warnings;
-our $VERSION = '0.000_011';
+our $VERSION = '0.000_012';
$VERSION = eval $VERSION;
use Carp;
View
2  lib/Alien/Base/ModuleBuild/Repository/FTP.pm
@@ -3,7 +3,7 @@ package Alien::Base::ModuleBuild::Repository::FTP;
use strict;
use warnings;
-our $VERSION = '0.000_011';
+our $VERSION = '0.000_012';
$VERSION = eval $VERSION;
use parent 'Alien::Base::ModuleBuild::Repository';
View
2  lib/Alien/Base/ModuleBuild/Repository/HTTP.pm
@@ -3,7 +3,7 @@ package Alien::Base::ModuleBuild::Repository::HTTP;
use strict;
use warnings;
-our $VERSION = '0.000_011';
+our $VERSION = '0.000_012';
$VERSION = eval $VERSION;
use Carp;
View
2  lib/Alien/Base/ModuleBuild/Repository/Local.pm
@@ -3,7 +3,7 @@ package Alien::Base::ModuleBuild::Repository::Local;
use strict;
use warnings;
-our $VERSION = '0.000_011';
+our $VERSION = '0.000_012';
$VERSION = eval $VERSION;
use Carp;
View
2  lib/Alien/Base/ModuleBuild/Utils.pm
@@ -4,7 +4,7 @@ package Alien::Base::ModuleBuild::Utils;
use strict;
use warnings;
-our $VERSION = '0.000_011';
+our $VERSION = '0.000_012';
$VERSION = eval $VERSION;
use Text::Balanced qw/extract_bracketed extract_delimited extract_multiple/;
View
2  lib/Alien/Base/PkgConfig.pm
@@ -3,7 +3,7 @@ package Alien::Base::PkgConfig;
use strict;
use warnings;
-our $VERSION = '0.000_011';
+our $VERSION = '0.000_012';
$VERSION = eval $VERSION;
use Carp;
View
7 t/zz-example.t
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More tests => 16;
+use Test::More tests => 17;
use File::chdir;
@@ -29,7 +29,10 @@ ok( -d '_alien', "ACTION_alien creates _alien (build) directory" );
ok( -d 'lib', "ACTION_alien creates 'lib' dir" );
{
local $CWD = 'lib';
- ok( -e 'libdontpanic.so', "ACTION_alien installs lib" );
+ ok( -e 'dontpanic.pc', "ACTION_alien installs .pc file" );
+ opendir(my $dh, $CWD);
+ my @files = grep { /^libdontpanic/ } readdir $dh;
+ ok( @files, "ACTION_aline installs shared object" );
}
ok( -d 'include', "ACTION_alien creates 'include' dir" );

No commit comments for this range

Something went wrong with that request. Please try again.