summaryrefslogtreecommitdiff
path: root/cpan/Module-Build/lib/Module/Build/Notes.pm
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2013-07-22 09:41:01 +0100
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2013-07-22 11:12:21 +0100
commit46de787b36986f74e850d2f1c95ddccc1ef7ce7d (patch)
tree08cae80de0fe6208855ec60e1756f052fbf5c515 /cpan/Module-Build/lib/Module/Build/Notes.pm
parentdd0df890d83ec74c796280919915491bb8e05104 (diff)
downloadperl-46de787b36986f74e850d2f1c95ddccc1ef7ce7d.tar.gz
Update Module-Build to CPAN version 4.007
[DELTA] 0.4007 - Fri Jul 19 13:44:39 CEST 2013 [BUG FIXES] - Removed undeclared test dependency on parent.pm [Leon Timmermans] - Declared dependency on Pod::Man 2.17 for utf8 support [Leon Timmermans] - Force generation of man pages in manify_with_utf8.t [Leon Timmermans] 0.4006 - Thu Jul 18 14:19:49 CEST 2013 [ENHANCEMENTS] - Significantly sped up some tests by not forcing HTML docs to be built when the user's config doesn't ask for them anyway. [Ken Williams] - The Module::Metadata package was split out from this distro back in 2010. Removed its regression tests. [Ken Williams] - Removed dependence on IO::File, replacing it with safe invocations of open(). [Sven Dowideit] - Added an 'extra_manify_args' parameter to facilitate man pages containing Unicode. [Joenio Costa] - Added an '--html_links 0' argument for the 'html' action, which can hugely speed things up. The main effect is speeding up the M::B tests themselves. [Ken Williams] [BUG FIXES] - Fix hash argument parsing in subclasses [Graham Ollis] - Revised detildification on VMS [Craig Berry] - Fix run_test_harness for case when $Switches is an empty string [Victor Efimov, Ken Williams]
Diffstat (limited to 'cpan/Module-Build/lib/Module/Build/Notes.pm')
-rw-r--r--cpan/Module-Build/lib/Module/Build/Notes.pm20
1 files changed, 10 insertions, 10 deletions
diff --git a/cpan/Module-Build/lib/Module/Build/Notes.pm b/cpan/Module-Build/lib/Module/Build/Notes.pm
index bd1433d9b3..adc5d1a6b0 100644
--- a/cpan/Module-Build/lib/Module/Build/Notes.pm
+++ b/cpan/Module-Build/lib/Module/Build/Notes.pm
@@ -4,10 +4,9 @@ package Module::Build::Notes;
use strict;
use vars qw($VERSION);
-$VERSION = '0.4005';
+$VERSION = '0.4007';
$VERSION = eval $VERSION;
use Data::Dumper;
-use IO::File;
use Module::Build::Dumper;
sub new {
@@ -24,9 +23,10 @@ sub new {
sub restore {
my $self = shift;
- my $fh = IO::File->new("< $self->{file}") or die "Can't read $self->{file}: $!";
+ open(my $fh, '<', $self->{file}) or die "Can't read $self->{file}: $!";
$self->{disk} = eval do {local $/; <$fh>};
die $@ if $@;
+ close $fh;
$self->{new} = {};
}
@@ -107,8 +107,9 @@ sub write {
sub _dump {
my ($self, $file, $data) = @_;
- my $fh = IO::File->new("> $file") or die "Can't create '$file': $!";
+ open(my $fh, '>', $file) or die "Can't create '$file': $!";
print {$fh} Module::Build::Dumper->_data_dump($data);
+ close $fh;
}
my $orig_template = do { local $/; <DATA> };
@@ -127,11 +128,11 @@ sub write_config_data {
# recognized for *this* source file
$template =~ s{$_\n}{} for '=begin private', '=end private';
- my $fh = IO::File->new("> $args{file}") or die "Can't create '$args{file}': $!";
+ open(my $fh, '>', $args{file}) or die "Can't create '$args{file}': $!";
print {$fh} $template;
print {$fh} "\n__DATA__\n";
print {$fh} Module::Build::Dumper->_data_dump([$args{config_data}, $args{feature}, $args{auto_features}]);
-
+ close $fh;
}
1;
@@ -188,7 +189,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
@@ -196,7 +196,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__$/;
@@ -205,11 +205,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: $!";