Config-IniFiles
view release on metacpan or search on metacpan
3.000003 2020-03-24
* Fix stray non-ASCII characters in the versions in the Changes log.
- https://rt.cpan.org/Ticket/Display.html?id=125161
- Thanks to SREZIC.
* Throw an error on failed close() before rename() to overwrite the file.
- https://rt.cpan.org/Ticket/Display.html?id=114140
- Thanks to SREZIC and fschlich.
* Allow overriding the output chmod() file permissions.
- https://rt.cpan.org/Ticket/Display.html?id=84431
3.000002 2019-03-14
* Fix error with missing here doc end marker
- Thanks to Igor Korchynskyi .
3.000001 2019-01-16
* Fix typos
- https://rt.cpan.org/Public/Bug/Display.html?id=128267
- Thanks to ROAM .
lib/Config/IniFiles.pm view on Meta::CPAN
$self->OutputConfigToFileHandle( $fh, $parms{-delta} );
close($fh) or Carp::confess("close failed: $!");
if ( !rename( $new_file, $filename ) )
{
carp "Unable to rename temp config file ($new_file) to ${filename}: $!";
return undef;
}
if ( exists $self->{file_mode} )
{
if ( not chmod( oct( $self->{file_mode} ), $filename ) )
{
carp "Unable to chmod $filename!";
}
}
return 1;
}
sub _write_config_with_a_made_fh
{
my ( $self, $fh, %parms ) = @_;
# TEST
ok( defined($ini), "default option works - \$ini works." );
# TEST
is( scalar( $ini->val( 'test2', 'three' ) ),
'value3', "default option works - ->val" );
# Test 4
# Check that Config::IniFiles respects RO permission on original INI file
$ini->WriteConfig( t_file("test07.ini") );
chmod 0444, t_file("test07.ini");
SKIP:
{
if ( -w t_file("test07.ini") )
{
skip( 'RO Permissions not settable.', 1 );
}
else
{
$ini->setval( 'test2', 'three', 'should not be here' );
( run in 0.297 second using v1.01-cache-2.11-cpan-8d75d55dd25 )