[Bps-public-commit] r15401 - in Shipwright/trunk: lib/Shipwright/Source
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Fri Aug 22 23:27:56 EDT 2008
Author: sunnavy
Date: Fri Aug 22 23:27:55 2008
New Revision: 15401
Modified:
Shipwright/trunk/ (props changed)
Shipwright/trunk/lib/Shipwright/Source/Base.pm
Log:
r16014 at sunnavys-mb: sunnavy | 2008-08-23 11:27:40 +0800
args of requires() in Module::Install can have multiple deps
Modified: Shipwright/trunk/lib/Shipwright/Source/Base.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Source/Base.pm (original)
+++ Shipwright/trunk/lib/Shipwright/Source/Base.pm Fri Aug 22 23:27:55 2008
@@ -117,13 +117,21 @@
my $shipwright_makefile = <<'EOF';
my $shipwright_req = {};
+sub _shipwright_requires {
+ my $type = shift;
+ my %req = @_;
+ for my $name ( keys %req ) {
+ $shipwright_req->{$type}{$name} = $req{$name};
+ }
+}
+
sub shipwright_requires {
- $shipwright_req->{requires}{$_[0]} = $_[1] || 0;
+ _shipwright_requires( 'requires', @_ == 1 ? ( @_, 0 ) : @_ );
goto &requires;
}
sub shipwright_build_requires {
- $shipwright_req->{build_requires}{$_[0]} = $_[1] || 0;
+ _shipwright_requires( 'build_requires', @_ == 1 ? ( @_, 0 ) : @_ );
goto &build_requires;
}
More information about the Bps-public-commit
mailing list