CPANPLUS-YACSmoke
view release on metacpan or search on metacpan
lib/CPANPLUS/YACSmoke/IniFiles.pm view on Meta::CPAN
};
my $oldfh = select(F);
$self->OutputConfig($parms{-delta});
close(F);
select($oldfh);
rename( $new_file, $file ) || do {
carp "Unable to rename temp config file ($new_file) to $file: $!";
return undef;
};
if (exists $self->{file_mode}) {
chmod oct($self->{file_mode}), $file;
}
} # Otherwise, reset to the start of the file and write, unless we are using STDIN
else {
# Get a filehandle, allowing almost any type of 'file' parameter
## NB: If this were a filename, this would fail because _make_file
## opens a read-only handle, but we have already checked that case
## so re-using the logic is ok [JW/WADG]
my $fh = $self->_make_filehandle( $file );
if (!$fh) {
( run in 0.331 second using v1.01-cache-2.11-cpan-496ff517765 )