diff options
Diffstat (limited to 'Master/tlpkg/tlperl/lib/Module/Build/ConfigData.pm')
-rw-r--r-- | Master/tlpkg/tlperl/lib/Module/Build/ConfigData.pm | 64 |
1 files changed, 30 insertions, 34 deletions
diff --git a/Master/tlpkg/tlperl/lib/Module/Build/ConfigData.pm b/Master/tlpkg/tlperl/lib/Module/Build/ConfigData.pm index 85fa28d869b..ec72359cd08 100644 --- a/Master/tlpkg/tlperl/lib/Module/Build/ConfigData.pm +++ b/Master/tlpkg/tlperl/lib/Module/Build/ConfigData.pm @@ -21,7 +21,6 @@ sub config_names { keys %$config } sub write { my $me = __FILE__; - require IO::File; # Can't use Module::Build::Dumper here because M::B is only a # build-time prereq of this module @@ -29,7 +28,7 @@ sub write { my $mode_orig = (stat $me)[2] & 07777; chmod($mode_orig | 0222, $me); # Make it writeable - my $fh = IO::File->new($me, 'r+') or die "Can't rewrite $me: $!"; + open(my $fh, '+<', $me) or die "Can't rewrite $me: $!"; seek($fh, 0, 0); while (<$fh>) { last if /^__DATA__$/; @@ -38,11 +37,11 @@ sub write { seek($fh, tell($fh), 0); my $data = [$config, $features, $auto_features]; - $fh->print( 'do{ my ' + print($fh 'do{ my ' . Data::Dumper->new([$data],['x'])->Purity(1)->Dump() . '$x; }' ); truncate($fh, tell($fh)); - $fh->close; + close $fh; chmod($mode_orig, $me) or warn "Couldn't restore permissions on $me: $!"; @@ -168,47 +167,44 @@ do{ my $x = [ {}, {}, { - 'license_creation' => { - 'requires' => { - 'Software::License' => 0 - }, - 'description' => 'Create licenses automatically in distributions' - }, - 'inc_bundling_support' => { - 'requires' => { - 'ExtUtils::Installed' => '1.999', - 'ExtUtils::Install' => '1.54' - }, - 'description' => 'Bundle Module::Build in inc/' - }, - 'manpage_support' => { - 'requires' => { - 'Pod::Man' => 0 - }, - 'description' => 'Create Unix man pages' - }, - 'PPM_support' => { - 'requires' => { - 'IO::File' => '1.13' - }, - 'description' => 'Generate PPM files for distributions' - }, 'dist_authoring' => { 'requires' => { 'Archive::Tar' => '1.09' }, + 'description' => 'Create new distributions', 'recommends' => { - 'Module::Signature' => '0.21', - 'Pod::Readme' => '0.04' - }, - 'description' => 'Create new distributions' + 'Pod::Readme' => '0.04', + 'Module::Signature' => '0.21' + } }, 'HTML_support' => { 'requires' => { 'Pod::Html' => 0 }, 'description' => 'Create HTML documentation' - } + }, + 'manpage_support' => { + 'requires' => { + 'Pod::Man' => 0 + }, + 'description' => 'Create Unix man pages' + }, + 'license_creation' => { + 'requires' => { + 'Software::License' => '0.103009' + }, + 'description' => 'Create licenses automatically in distributions' + }, + 'PPM_support' => { + 'description' => 'Generate PPM files for distributions' + }, + 'inc_bundling_support' => { + 'requires' => { + 'ExtUtils::Installed' => '1.999', + 'ExtUtils::Install' => '1.54' + }, + 'description' => 'Bundle Module::Build in inc/' + } } ]; $x; }
\ No newline at end of file |