diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/Pod-Functions/Functions_pm.PL (renamed from ext/Pod-Functions/Functions.pm) | 23 | ||||
-rw-r--r-- | ext/Pod-Functions/Makefile.PL | 16 |
2 files changed, 39 insertions, 0 deletions
diff --git a/ext/Pod-Functions/Functions.pm b/ext/Pod-Functions/Functions_pm.PL index 1069c43c33..f8329d23cd 100644 --- a/ext/Pod-Functions/Functions.pm +++ b/ext/Pod-Functions/Functions_pm.PL @@ -1,3 +1,26 @@ +#!perl -w +use strict; + +# blead will run this with miniperl, hence we can't use autodie +my $real = 'Functions.pm'; +my $temp = "Functions.$$"; + +END { + return if !-e $temp; + unlink $temp or warn "Can't unlink '$temp': $!"; +} + +foreach ($real, $temp) { + next if !-e $_; + unlink $_ or die "Can't unlink '$_': $!"; +} + +open my $fh, '>', $temp or die "Can't open '$temp' for writing: $!"; +print $fh <DATA> or die "Can't write to '$temp': $!"; +close $fh or die "Can't close '$temp': $!"; +rename $temp, $real or die "Can't rename '$temp' to '$real': $!"; + +__END__ package Pod::Functions; use strict; diff --git a/ext/Pod-Functions/Makefile.PL b/ext/Pod-Functions/Makefile.PL new file mode 100644 index 0000000000..64936dc840 --- /dev/null +++ b/ext/Pod-Functions/Makefile.PL @@ -0,0 +1,16 @@ +#!perl -w + +use strict; +use ExtUtils::MakeMaker; + +WriteMakefile(NAME => 'Pod::Functions', + VERSION_FROM => 'Functions_pm.PL', + LICENSE => 'perl', + PREREQ_PM => {}, + ABSTRACT_FROM => 'Functions_pm.PL', + AUTHOR => 'Perl 5 Porters <perlbug@perl.org>', + INSTALLDIRS => 'perl', + PL_FILES => {'Functions_pm.PL' => 'Functions.pm'}, + PM => {'Functions.pm' => '$(INST_LIBDIR)/Functions.pm'}, + clean => {FILES => 'Functions.pm'}, + ); |