diff -ruN Module-Install-0.79-orig/inc/Module/Install/Metadata.pm Module-Install-0.79/inc/Module/Install/Metadata.pm
--- Module-Install-0.79-orig/inc/Module/Install/Metadata.pm 2009-02-20 19:49:25.000000000 -0500
+++ Module-Install-0.79/inc/Module/Install/Metadata.pm 2009-02-20 20:58:24.000000000 -0500
@@ -71,42 +71,54 @@
sub requires {
my $self = shift;
+ return $self->{values}{requires} unless @_;
+ my @added;
while ( @_ ) {
my $module = shift or last;
my $version = shift || 0;
- push @{ $self->{values}{requires} }, [ $module, $version ];
+ push @added, [ $module, $version ];
}
- $self->{values}{requires};
+ push @{ $self->{values}{requires} }, @added;
+ return map {@$_} @added;
}
sub build_requires {
my $self = shift;
+ return $self->{values}{build_requires} unless @_;
+ my @added;
while ( @_ ) {
my $module = shift or last;
my $version = shift || 0;
- push @{ $self->{values}{build_requires} }, [ $module, $version ];
+ push @added, [ $module, $version ];
}
- $self->{values}{build_requires};
+ push @{ $self->{values}{build_requires} }, @added;
+ return map {@$_} @added;
}
sub configure_requires {
my $self = shift;
+ return $self->{values}{configure_requires} unless @_;
+ my @added;
while ( @_ ) {
my $module = shift or last;
my $version = shift || 0;
- push @{ $self->{values}{configure_requires} }, [ $module, $version ];
+ push @added, [ $module, $version ];
}
- $self->{values}{configure_requires};
+ push @{ $self->{values}{configure_requires} }, @added;
+ return map {@$_} @added;
}
sub recommends {
my $self = shift;
+ return $self->{values}{recommends} unless @_;
+ my @added;
while ( @_ ) {
my $module = shift or last;
my $version = shift || 0;
- push @{ $self->{values}{recommends} }, [ $module, $version ];
+ push @added, [ $module, $version ];
}
- $self->{values}{recommends};
+ push @{ $self->{values}{recommends} }, @added;
+ return map {@$_} @added;
}
sub bundles {
diff -ruN Module-Install-0.79-orig/lib/Module/Install/Metadata.pm Module-Install-0.79/lib/Module/Install/Metadata.pm
--- Module-Install-0.79-orig/lib/Module/Install/Metadata.pm 2009-02-20 19:49:25.000000000 -0500
+++ Module-Install-0.79/lib/Module/Install/Metadata.pm 2009-02-20 20:56:50.000000000 -0500
@@ -70,42 +70,54 @@
sub requires {
my $self = shift;
+ return $self->{values}{requires} unless @_;
+ my @added;
while ( @_ ) {
my $module = shift or last;
my $version = shift || 0;
- push @{ $self->{values}{requires} }, [ $module, $version ];
+ push @added, [ $module, $version ];
}
- $self->{values}{requires};
+ push @{ $self->{values}{requires} }, @added;
+ return map {@$_} @added;
}
sub build_requires {
my $self = shift;
+ return $self->{values}{build_requires} unless @_;
+ my @added;
while ( @_ ) {
my $module = shift or last;
my $version = shift || 0;
- push @{ $self->{values}{build_requires} }, [ $module, $version ];
+ push @added, [ $module, $version ];
}
- $self->{values}{build_requires};
+ push @{ $self->{values}{build_requires} }, @added;
+ return map {@$_} @added;
}
sub configure_requires {
my $self = shift;
+ return $self->{values}{configure_requires} unless @_;
+ my @added;
while ( @_ ) {
my $module = shift or last;
my $version = shift || 0;
- push @{ $self->{values}{configure_requires} }, [ $module, $version ];
+ push @added, [ $module, $version ];
}
- $self->{values}{configure_requires};
+ push @{ $self->{values}{configure_requires} }, @added;
+ return map {@$_} @added;
}
sub recommends {
my $self = shift;
+ return $self->{values}{recommends} unless @_;
+ my @added;
while ( @_ ) {
my $module = shift or last;
my $version = shift || 0;
- push @{ $self->{values}{recommends} }, [ $module, $version ];
+ push @added, [ $module, $version ];
}
- $self->{values}{recommends};
+ push @{ $self->{values}{recommends} }, @added;
+ return map {@$_} @added;
}
sub bundles {