Skip to content

Commit

Permalink
Extract _PREREQ_PRINT() from new()
Browse files Browse the repository at this point in the history
  • Loading branch information
schwern committed Jul 13, 2009
1 parent 04e4a0e commit 511fdab
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
23 changes: 23 additions & 0 deletions lib/ExtUtils/MM_Any.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2236,6 +2236,29 @@ sub platform_constants {
return '';
}

=begin private
=head3 _PREREQ_PRINT
$self->_PREREQ_PRINT;
Implements PREREQ_PRINT.
Refactored out of MakeMaker->new().
=end private
=cut

sub _PREREQ_PRINT {
my $self = shift;

require Data::Dumper;
my @what = ('PREREQ_PM');
push @what, 'MIN_PERL_VERSION' if $self->{MIN_PERL_VERSION};
print Data::Dumper->Dump([@{$self}{@what}], \@what);
exit 0;
}

=head1 AUTHOR
Expand Down
6 changes: 1 addition & 5 deletions lib/ExtUtils/MakeMaker.pm
Original file line number Diff line number Diff line change
Expand Up @@ -390,11 +390,7 @@ sub new {
}

if ("@ARGV" =~ /\bPREREQ_PRINT\b/) {
require Data::Dumper;
my @what = ('PREREQ_PM');
push @what, 'MIN_PERL_VERSION' if $self->{MIN_PERL_VERSION};
print Data::Dumper->Dump([@{$self}{@what}], \@what);
exit 0;
$self->_PREREQ_PRINT;
}

# PRINT_PREREQ is RedHatism.
Expand Down

0 comments on commit 511fdab

Please sign in to comment.