diff options
author | Steffen Mueller <smueller@cpan.org> | 2011-05-11 19:20:05 +0200 |
---|---|---|
committer | Steffen Mueller <smueller@cpan.org> | 2011-07-18 23:11:17 +0200 |
commit | 0d9379a10d834de7e4e3c94b5735497af6202951 (patch) | |
tree | 622cf10eea65d0b992af4bee300286a50d0a7242 | |
parent | e2a6d476a9eed993876f0df70c3b35bab6d09520 (diff) | |
download | perl-smueller/perllocal_eucmd.tar.gz |
Use ExtUtils::Perllocal in ExtUtils::Command::MMsmueller/perllocal_eucmd
-rw-r--r-- | cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm index 5a33bff6a3..b2c7573617 100644 --- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm +++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/Command/MM.pm @@ -10,7 +10,7 @@ our @ISA = qw(Exporter); our @EXPORT = qw(test_harness pod2man perllocal_install uninstall warn_if_old_packlist); -our $VERSION = '6.58'; +our $VERSION = '6.58_01'; my $Is_VMS = $^O eq 'VMS'; @@ -206,6 +206,22 @@ sub perllocal_install { my @mod_info = $Is_VMS ? split /\|/, <STDIN> : @ARGV; + if (not eval "require ExtUtils::Perllocal; require ExtUtils::Perllocal::Entry; 1;") { + return _legacy_perllocal_install($type, $name, @mod_info); + } + else { + my $pod = ExtUtils::Perllocal::Entry->new( + type => $type, name => $name, 'time' => time(), + data => {@mod_info} + )->as_pod; + print $pod; + return 1; + } +} + +sub _legacy_perllocal_install { + my ($type, $name, @mod_info) = @_; + my $pod; $pod = sprintf <<POD, scalar localtime; =head2 %s: C<$type> L<$name|$name> |