This is an automated email from the git hooks/post-receive script. dod pushed a commit to annotated tag debian/2.117-1 in repository libconfig-model-perl.
commit 3f4ce7ba84d845dcca80ed9b2cd7252d5720d8c9 Author: Dominique Dumont <[email protected]> Date: Mon Feb 19 18:49:20 2018 +0100 New upstream version 2.117 --- Build.PL | 2 +- Changes | 6 +++ LICENSE | 2 +- META.json | 2 +- META.yml | 2 +- lib/Config/Model.pm | 8 ++-- lib/Config/Model/Annotation.pm | 8 ++-- lib/Config/Model/AnyId.pm | 9 ++-- lib/Config/Model/AnyThing.pm | 8 ++-- lib/Config/Model/Backend/Any.pm | 8 ++-- lib/Config/Model/Backend/CdsFile.pm | 8 ++-- lib/Config/Model/Backend/Fstab.pm | 8 ++-- lib/Config/Model/Backend/IniFile.pm | 8 ++-- lib/Config/Model/Backend/Json.pm | 8 ++-- lib/Config/Model/Backend/PerlFile.pm | 8 ++-- lib/Config/Model/Backend/PlainFile.pm | 27 +++++------ lib/Config/Model/Backend/ShellVar.pm | 8 ++-- lib/Config/Model/Backend/Yaml.pm | 8 ++-- lib/Config/Model/BackendMgr.pm | 49 +++++++++----------- lib/Config/Model/BackendTrackOrder.pm | 8 ++-- lib/Config/Model/CheckList.pm | 8 ++-- lib/Config/Model/Cookbook/CreateModelFromDoc.pod | 4 +- lib/Config/Model/Describe.pm | 8 ++-- lib/Config/Model/DumpAsData.pm | 8 ++-- lib/Config/Model/Dumper.pm | 8 ++-- lib/Config/Model/Exception.pm | 54 ++++++++++++---------- lib/Config/Model/FuseUI.pm | 8 ++-- lib/Config/Model/HashId.pm | 9 ++-- lib/Config/Model/IdElementReference.pm | 8 ++-- lib/Config/Model/Instance.pm | 8 ++-- lib/Config/Model/Iterator.pm | 8 ++-- lib/Config/Model/ListId.pm | 8 ++-- lib/Config/Model/Lister.pm | 8 ++-- lib/Config/Model/Loader.pm | 8 ++-- lib/Config/Model/Manual/ModelCreationAdvanced.pod | 4 +- .../Model/Manual/ModelCreationIntroduction.pod | 4 +- lib/Config/Model/Node.pm | 8 ++-- lib/Config/Model/ObjTreeScanner.pm | 8 ++-- lib/Config/Model/Report.pm | 8 ++-- lib/Config/Model/Role/ComputeFunction.pm | 8 ++-- lib/Config/Model/Role/FileHandler.pm | 21 +++++---- lib/Config/Model/Role/Grab.pm | 8 ++-- lib/Config/Model/Role/HelpAsText.pm | 8 ++-- lib/Config/Model/Role/NodeLoader.pm | 8 ++-- lib/Config/Model/Role/WarpMaster.pm | 8 ++-- lib/Config/Model/SearchElement.pm | 8 ++-- lib/Config/Model/SimpleUI.pm | 8 ++-- lib/Config/Model/TermUI.pm | 8 ++-- lib/Config/Model/TreeSearcher.pm | 8 ++-- lib/Config/Model/Utils/GenClassPod.pm | 8 ++-- lib/Config/Model/Value.pm | 8 ++-- lib/Config/Model/Value/LayeredInclude.pm | 8 ++-- lib/Config/Model/ValueComputer.pm | 8 ++-- lib/Config/Model/WarpedNode.pm | 8 ++-- lib/Config/Model/Warper.pm | 8 ++-- lib/Config/Model/models/Fstab.pl | 2 +- lib/Config/Model/models/Fstab/CommonOptions.pl | 2 +- lib/Config/Model/models/Fstab/Ext2FsOpt.pl | 2 +- lib/Config/Model/models/Fstab/Ext3FsOpt.pl | 2 +- lib/Config/Model/models/Fstab/Ext4FsOpt.pl | 2 +- lib/Config/Model/models/Fstab/FsLine.pl | 2 +- lib/Config/Model/models/Fstab/Iso9660_Opt.pl | 2 +- lib/Config/Model/models/Fstab/NoneOptions.pl | 2 +- lib/Config/Model/models/Fstab/SwapOptions.pl | 2 +- lib/Config/Model/models/Fstab/UsbFsOptions.pl | 2 +- lib/Config/Model/models/Multistrap.pl | 2 +- lib/Config/Model/models/Multistrap/Section.pl | 2 +- lib/Config/Model/models/PopCon.pl | 2 +- t/annotation.t | 2 +- t/array_id.t | 2 +- t/hash_id_of_values.t | 3 +- t/lib/Config/Model/models/Master.pl | 2 +- t/lib/DummyNode.pm | 2 +- t/lib/MyTestLib.pm | 2 +- t/lib/dump_load_model.pm | 2 +- t/lib/test_ini_backend_model.pl | 2 +- t/lib/test_yaml_model.pl | 2 +- t/model_tests.d/backend-cds-test-conf.pl | 2 +- t/model_tests.d/backend-ini-test-conf.pl | 2 +- t/model_tests.d/backend-json-test-conf.pl | 2 +- t/model_tests.d/backend-key-value-test-conf.pl | 2 +- t/model_tests.d/backend-perl-test-conf.pl | 2 +- t/model_tests.d/backend-plainfile-test-conf.pl | 2 +- t/model_tests.d/backend-shellvar-test-conf.pl | 2 +- t/model_tests.d/backend-yaml-data-test-conf.pl | 2 +- t/model_tests.d/backend-yaml-test-conf.pl | 2 +- t/model_tests.d/fstab-test-conf.pl | 2 +- .../layer-examples/mini/etc/foo-config.pl | 2 +- .../layer-examples/mini/home/joe/foo/config.pl | 2 +- t/model_tests.d/layer-test-conf.pl | 2 +- t/model_tests.d/multi-ini-test-conf.pl | 2 +- t/model_tests.d/multistrap-test-conf.pl | 2 +- t/model_tests.d/popcon-test-conf.pl | 2 +- t/value.t | 2 +- t/value_compute.t | 2 +- 95 files changed, 307 insertions(+), 297 deletions(-) diff --git a/Build.PL b/Build.PL index c67da85..18d00a7 100644 --- a/Build.PL +++ b/Build.PL @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/Changes b/Changes index 553f997..9206a87 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,9 @@ +2.117 2018-02-03 + + Bug fixes: + * notify about addition of hash key only when needed + * fix error message of "missing file" exception + 2.116 2017-12-15 Fix broken cme: diff --git a/LICENSE b/LICENSE index 753e43a..842cbe0 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/META.json b/META.json index 440322e..95aa01b 100644 --- a/META.json +++ b/META.json @@ -96,7 +96,7 @@ "web" : "http://github.com/dod38fr/config-model" } }, - "version" : "2.116", + "version" : "2.117", "x_serialization_backend" : "JSON::XS version 3.04" } diff --git a/META.yml b/META.yml index 6b982b0..bca22ad 100644 --- a/META.yml +++ b/META.yml @@ -67,5 +67,5 @@ resources: bugtracker: https://github.com/dod38fr/config-model/issues homepage: https://github.com/dod38fr/config-model/wiki repository: git://github.com/dod38fr/config-model.git -version: '2.116' +version: '2.117' x_serialization_backend: 'YAML::Tiny version 1.70' diff --git a/lib/Config/Model.pm b/lib/Config/Model.pm index 78e4afa..64c8114 100644 --- a/lib/Config/Model.pm +++ b/lib/Config/Model.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model; -$Config::Model::VERSION = '2.116'; +$Config::Model::VERSION = '2.117'; use strict ; use warnings; use 5.10.1; @@ -1846,7 +1846,7 @@ Config::Model - Create tools to validate, migrate and edit configuration files =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -2882,7 +2882,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/Annotation.pm b/lib/Config/Model/Annotation.pm index e9b355f..1ef472b 100644 --- a/lib/Config/Model/Annotation.pm +++ b/lib/Config/Model/Annotation.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::Annotation; -$Config::Model::Annotation::VERSION = '2.116'; +$Config::Model::Annotation::VERSION = '2.117'; use Mouse; use English; @@ -164,7 +164,7 @@ Config::Model::Annotation - Read and write configuration annotations =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -283,7 +283,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/AnyId.pm b/lib/Config/Model/AnyId.pm index 0501ad4..7236d10 100644 --- a/lib/Config/Model/AnyId.pm +++ b/lib/Config/Model/AnyId.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::AnyId; -$Config::Model::AnyId::VERSION = '2.116'; +$Config::Model::AnyId::VERSION = '2.117'; use 5.010; use Mouse; @@ -943,7 +943,6 @@ sub auto_vivify { my $imode = $self->instance->get_data_mode; $self->set_data_mode( $idx, $imode ); - $self->notify_change(note => "added entry $idx"); $self->_store( $idx, $item ); } @@ -1038,7 +1037,7 @@ Config::Model::AnyId - Base class for hash or list element =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -1643,7 +1642,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/AnyThing.pm b/lib/Config/Model/AnyThing.pm index a4a381a..ace8a06 100644 --- a/lib/Config/Model/AnyThing.pm +++ b/lib/Config/Model/AnyThing.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::AnyThing; -$Config::Model::AnyThing::VERSION = '2.116'; +$Config::Model::AnyThing::VERSION = '2.117'; use Mouse; # FIXME: must cleanup warp mechanism to implement this @@ -327,7 +327,7 @@ Config::Model::AnyThing - Base class for configuration tree item =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -518,7 +518,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/Backend/Any.pm b/lib/Config/Model/Backend/Any.pm index 6b008ea..287b91c 100644 --- a/lib/Config/Model/Backend/Any.pm +++ b/lib/Config/Model/Backend/Any.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::Backend::Any; -$Config::Model::Backend::Any::VERSION = '2.116'; +$Config::Model::Backend::Any::VERSION = '2.117'; use Carp; use strict; use warnings; @@ -183,7 +183,7 @@ Config::Model::Backend::Any - Virtual class for other backends =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -520,7 +520,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/Backend/CdsFile.pm b/lib/Config/Model/Backend/CdsFile.pm index cfc953b..a088227 100644 --- a/lib/Config/Model/Backend/CdsFile.pm +++ b/lib/Config/Model/Backend/CdsFile.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::Backend::CdsFile; -$Config::Model::Backend::CdsFile::VERSION = '2.116'; +$Config::Model::Backend::CdsFile::VERSION = '2.117'; use 5.10.1; use Carp; use strict; @@ -79,7 +79,7 @@ Config::Model::Backend::CdsFile - Read and write config as a Cds data structure =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -203,7 +203,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/Backend/Fstab.pm b/lib/Config/Model/Backend/Fstab.pm index b9f761c..dc395af 100644 --- a/lib/Config/Model/Backend/Fstab.pm +++ b/lib/Config/Model/Backend/Fstab.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::Backend::Fstab; -$Config::Model::Backend::Fstab::VERSION = '2.116'; +$Config::Model::Backend::Fstab::VERSION = '2.117'; use Mouse; use Carp; use Log::Log4perl qw(get_logger :levels); @@ -162,7 +162,7 @@ Config::Model::Backend::Fstab - Read and write config from fstab file =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -225,7 +225,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/Backend/IniFile.pm b/lib/Config/Model/Backend/IniFile.pm index 9a38dd9..7e9fee7 100644 --- a/lib/Config/Model/Backend/IniFile.pm +++ b/lib/Config/Model/Backend/IniFile.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::Backend::IniFile; -$Config::Model::Backend::IniFile::VERSION = '2.116'; +$Config::Model::Backend::IniFile::VERSION = '2.117'; use Carp; use Mouse; use 5.10.0; @@ -412,7 +412,7 @@ Config::Model::Backend::IniFile - Read and write config as a INI file =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -740,7 +740,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/Backend/Json.pm b/lib/Config/Model/Backend/Json.pm index e8f5385..f3b4668 100644 --- a/lib/Config/Model/Backend/Json.pm +++ b/lib/Config/Model/Backend/Json.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::Backend::Json; -$Config::Model::Backend::Json::VERSION = '2.116'; +$Config::Model::Backend::Json::VERSION = '2.117'; use Carp; use strict; use warnings; @@ -91,7 +91,7 @@ Config::Model::Backend::Json - Read and write config as a JSON data structure =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -196,7 +196,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/Backend/PerlFile.pm b/lib/Config/Model/Backend/PerlFile.pm index 9bc5aa5..5ce0288 100644 --- a/lib/Config/Model/Backend/PerlFile.pm +++ b/lib/Config/Model/Backend/PerlFile.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::Backend::PerlFile; -$Config::Model::Backend::PerlFile::VERSION = '2.116'; +$Config::Model::Backend::PerlFile::VERSION = '2.117'; use 5.10.1; use Carp; use strict; @@ -88,7 +88,7 @@ Config::Model::Backend::PerlFile - Read and write config as a Perl data structur =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -212,7 +212,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/Backend/PlainFile.pm b/lib/Config/Model/Backend/PlainFile.pm index 2c089bc..4a14dbf 100644 --- a/lib/Config/Model/Backend/PlainFile.pm +++ b/lib/Config/Model/Backend/PlainFile.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::Backend::PlainFile; -$Config::Model::Backend::PlainFile::VERSION = '2.116'; +$Config::Model::Backend::PlainFile::VERSION = '2.117'; use 5.10.1; use Carp; use Mouse; @@ -19,6 +19,7 @@ use Log::Log4perl qw(get_logger :levels); extends 'Config::Model::Backend::Any'; with "Config::Model::Role::ComputeFunction"; +with "Config::Model::Role::FileHandler"; my $logger = get_logger("Backend::PlainFile"); @@ -46,7 +47,6 @@ sub read { # check => yes|no|skip my $check = $args{check} || 'yes'; - my $dir = $args{config_dir}; my $node = $args{object}; $logger->trace( "called on node ", $node->name ); @@ -55,8 +55,8 @@ sub read { foreach my $elt ( $node->get_element_names(all => 1) ) { my $obj = $args{object}->fetch_element( name => $elt ); - my $dir = path($args{root} . $dir); my $file_name = $args{file} ? $obj->compute_string($args{file}) : $elt; + my $dir = $self->get_tuned_config_dir(%args); my $file = $dir->child($file_name); $logger->trace("looking for plainfile $file "); @@ -125,8 +125,10 @@ sub write { # check => yes|no|skip my $check = $args{check} || 'yes'; - my $dir = path($args{root} . $args{config_dir}); - $dir->mkpath({ mode => 0755 } ) unless -d $dir; + my $cfg_dir = $args{config_dir}; + my $dir = $self->get_tuned_config_dir(%args); + $dir->mkpath({ mode => 0755 } ) unless $dir->is_dir; + my $node = $args{object}; $logger->debug( "PlainFile write called on node ", $node->name ); @@ -180,18 +182,17 @@ sub delete { # io_handle => $io # IO::File object # check => yes|no|skip - my $dir = $args{root} . $args{config_dir}; + my $dir = $self->get_tuned_config_dir(%args); my $node = $args{object}; $logger->debug( "PlainFile delete called on deleted node"); # write data from leaf element from the node foreach my $elt ( $node->get_element_name() ) { - my $obj = $args{object}->fetch_element( name => $elt ); + my $obj = $node->fetch_element( name => $elt ); - my $file = $dir; - $file .= $args{file} ? $obj->compute_string($args{file}) : $elt; + my $file = $dir->child($args{file} ? $obj->compute_string($args{file}) : $elt); $logger->info( "Removing $file (deleted node)" ); - unlink($file); + $file->remove; } } @@ -214,7 +215,7 @@ Config::Model::Backend::PlainFile - Read and write config as plain file =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -338,7 +339,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/Backend/ShellVar.pm b/lib/Config/Model/Backend/ShellVar.pm index e38c0ca..6888205 100644 --- a/lib/Config/Model/Backend/ShellVar.pm +++ b/lib/Config/Model/Backend/ShellVar.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::Backend::ShellVar; -$Config::Model::Backend::ShellVar::VERSION = '2.116'; +$Config::Model::Backend::ShellVar::VERSION = '2.117'; use Carp; use Mouse; use Config::Model::Exception; @@ -134,7 +134,7 @@ Config::Model::Backend::ShellVar - Read and write config as a C<SHELLVAR> data s =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -224,7 +224,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/Backend/Yaml.pm b/lib/Config/Model/Backend/Yaml.pm index bfb3de1..aa2dbb4 100644 --- a/lib/Config/Model/Backend/Yaml.pm +++ b/lib/Config/Model/Backend/Yaml.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::Backend::Yaml; -$Config::Model::Backend::Yaml::VERSION = '2.116'; +$Config::Model::Backend::Yaml::VERSION = '2.117'; use 5.10.1; use Carp; use strict; @@ -127,7 +127,7 @@ Config::Model::Backend::Yaml - Read and write config as a YAML data structure =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -294,7 +294,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/BackendMgr.pm b/lib/Config/Model/BackendMgr.pm index fd32e39..72a2b85 100644 --- a/lib/Config/Model/BackendMgr.pm +++ b/lib/Config/Model/BackendMgr.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::BackendMgr; -$Config::Model::BackendMgr::VERSION = '2.116'; +$Config::Model::BackendMgr::VERSION = '2.117'; use Mouse; use strict; use warnings; @@ -67,11 +67,6 @@ sub _build_backend_obj { return $c->new( node => $self->node, name => $backend ); } -# Configuration directory where to read and write files. This value -# does not override the configuration directory specified in the model -# data passed to read and write functions. -has config_dir => ( is => 'ro', isa => 'Maybe[Str]', required => 0 ); - has support_annotation => ( is => 'ro', isa => 'Bool', @@ -89,15 +84,14 @@ sub get_cfg_dir_path { my $w = $args{write} || 0; my $dir = $self->get_tuned_config_dir(%args); - $dir = $args{root} . $dir; - - if ( not -d $dir and $w and $args{auto_create} ) { + if ( not $dir->is_dir and $w and $args{auto_create} ) { $logger->info("creating directory $dir"); - mkpath( $dir, 0, 0755 ); + $dir->mkpath; } - unless ( -d $dir ) { - $logger->info( "auto_" . ( $w ? 'write' : 'read' ) . " $args{backend} no directory $dir" ); + unless ( $dir->is_dir ) { + my $mode = $w ? 'write' : 'read'; + $logger->info( "$args{backend}: missing directory $dir ($mode mode)" ); return ( 0, $dir ); } @@ -123,11 +117,10 @@ sub get_cfg_file_path { } if ( defined $cfo ) { - my $override = $args{root} . $args{config_file}; - $logger->trace( "auto_" - . ( $w ? 'write' : 'read' ) - . " $args{backend} override target file is $override" ); - return ( 1, $args{root} . $args{config_file} ); + my $override = $args{root} ? path($args{root})->child($cfo) : path($cfo); + my $mode = $w ? 'write' : 'read'; + $logger->trace("$args{backend} override target file is $override ($mode mode)"); + return ( 1, $override ); } Config::Model::Exception::Model->throw( @@ -139,7 +132,7 @@ sub get_cfg_file_path { if ( defined $args{file} ) { my $file = $args{skip_compute} ? $args{file} : $self->node->compute_string($args{file}); - my $res = $dir . $file; + my $res = $dir->child($file); $logger->trace("get_cfg_file_path: returns $res"); return ( $dir_ok, $res ); } @@ -355,12 +348,7 @@ sub try_read_backend { }; $error = $@; - # only backend based on C::M::Backend::Any can support annotations - if ($backend_obj->can('annotation')) { - $self->{support_annotation} ||= $backend_obj->annotation ; - } - - # catch eval errors done in the if-then-else block before + # catch eval error if ( ref($error) and $error->isa('Config::Model::Exception::Syntax') ) { $error->parsed_file( $file_path) unless $error->parsed_file; @@ -376,6 +364,11 @@ sub try_read_backend { die "Backend error: $error"; } + # only backend based on C::M::Backend::Any can support annotations + if ($backend_obj->can('annotation')) { + $self->{support_annotation} = $backend_obj->annotation ; + } + return ( $res, $file_path ); } @@ -560,7 +553,7 @@ Config::Model::BackendMgr - Load configuration node on demand =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -818,7 +811,7 @@ C<rw_config> specification. =head2 support_annotation -Returns 1 if at least one of the backends support to read and write annotations +Returns 1 if at least the backend supports read and write annotations (aka comments) in the configuration file. =head1 AUTHOR @@ -836,7 +829,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/BackendTrackOrder.pm b/lib/Config/Model/BackendTrackOrder.pm index 216810f..4d5987e 100644 --- a/lib/Config/Model/BackendTrackOrder.pm +++ b/lib/Config/Model/BackendTrackOrder.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::BackendTrackOrder; -$Config::Model::BackendTrackOrder::VERSION = '2.116'; +$Config::Model::BackendTrackOrder::VERSION = '2.117'; # ABSTRACT: Track read order of elements from configuration use Mouse; @@ -140,7 +140,7 @@ Config::Model::BackendTrackOrder - Track read order of elements from configurati =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -217,7 +217,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/CheckList.pm b/lib/Config/Model/CheckList.pm index 7986ab2..bdcef33 100644 --- a/lib/Config/Model/CheckList.pm +++ b/lib/Config/Model/CheckList.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::CheckList; -$Config::Model::CheckList::VERSION = '2.116'; +$Config::Model::CheckList::VERSION = '2.117'; use Mouse; use 5.010; @@ -755,7 +755,7 @@ Config::Model::CheckList - Handle check list element =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -1207,7 +1207,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/Cookbook/CreateModelFromDoc.pod b/lib/Config/Model/Cookbook/CreateModelFromDoc.pod index 16264ad..85d9c5a 100644 --- a/lib/Config/Model/Cookbook/CreateModelFromDoc.pod +++ b/lib/Config/Model/Cookbook/CreateModelFromDoc.pod @@ -13,7 +13,7 @@ Config::Model::Cookbook::CreateModelFromDoc - Create a configuration model from =head1 VERSION -version 2.116 +version 2.117 =head1 Introduction @@ -306,7 +306,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/Describe.pm b/lib/Config/Model/Describe.pm index 1024f9a..1e9d7ac 100644 --- a/lib/Config/Model/Describe.pm +++ b/lib/Config/Model/Describe.pm @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # @@ -9,7 +9,7 @@ # package Config::Model::Describe; -$Config::Model::Describe::VERSION = '2.116'; +$Config::Model::Describe::VERSION = '2.117'; use Carp; use strict; use warnings; @@ -214,7 +214,7 @@ Config::Model::Describe - Provide a description of a node element =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -341,7 +341,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/DumpAsData.pm b/lib/Config/Model/DumpAsData.pm index c2a818d..4660c44 100644 --- a/lib/Config/Model/DumpAsData.pm +++ b/lib/Config/Model/DumpAsData.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::DumpAsData; -$Config::Model::DumpAsData::VERSION = '2.116'; +$Config::Model::DumpAsData::VERSION = '2.117'; use Carp; use strict; use warnings; @@ -256,7 +256,7 @@ Config::Model::DumpAsData - Dump configuration content as a perl data structure =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -421,7 +421,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/Dumper.pm b/lib/Config/Model/Dumper.pm index b38b8ca..09b3f26 100644 --- a/lib/Config/Model/Dumper.pm +++ b/lib/Config/Model/Dumper.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::Dumper; -$Config::Model::Dumper::VERSION = '2.116'; +$Config::Model::Dumper::VERSION = '2.117'; use Carp; use strict; use warnings; @@ -259,7 +259,7 @@ Config::Model::Dumper - Serialize data of config tree =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -394,7 +394,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/Exception.pm b/lib/Config/Model/Exception.pm index cd3591e..ab58955 100644 --- a/lib/Config/Model/Exception.pm +++ b/lib/Config/Model/Exception.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::Exception; -$Config::Model::Exception::VERSION = '2.116'; +$Config::Model::Exception::VERSION = '2.117'; use warnings; use strict; use Data::Dumper; @@ -100,19 +100,19 @@ sub full_message { } package Config::Model::Exception::Any; -$Config::Model::Exception::Any::VERSION = '2.116'; +$Config::Model::Exception::Any::VERSION = '2.117'; use Mouse; extends 'Config::Model::Exception'; package Config::Model::Exception::ModelDeclaration; -$Config::Model::Exception::ModelDeclaration::VERSION = '2.116'; +$Config::Model::Exception::ModelDeclaration::VERSION = '2.117'; use Mouse; extends 'Config::Model::Exception::Fatal'; sub _desc {'configuration model declaration error' } package Config::Model::Exception::User ; -$Config::Model::Exception::User::VERSION = '2.116'; +$Config::Model::Exception::User::VERSION = '2.117'; use Mouse; extends 'Config::Model::Exception::Any'; sub _desc {'user error' } @@ -120,7 +120,7 @@ sub _desc {'user error' } ## old classes below package Config::Model::Exception::Syntax; -$Config::Model::Exception::Syntax::VERSION = '2.116'; +$Config::Model::Exception::Syntax::VERSION = '2.117'; use Mouse; extends 'Config::Model::Exception::Any'; @@ -141,7 +141,7 @@ sub full_message { } package Config::Model::Exception::LoadData; -$Config::Model::Exception::LoadData::VERSION = '2.116'; +$Config::Model::Exception::LoadData::VERSION = '2.117'; use Mouse; extends 'Config::Model::Exception::User'; @@ -165,7 +165,7 @@ sub full_message { } package Config::Model::Exception::Model; -$Config::Model::Exception::Model::VERSION = '2.116'; +$Config::Model::Exception::Model::VERSION = '2.117'; use Mouse; extends 'Config::Model::Exception::Fatal'; @@ -198,7 +198,7 @@ sub full_message { } package Config::Model::Exception::Load; -$Config::Model::Exception::Load::VERSION = '2.116'; +$Config::Model::Exception::Load::VERSION = '2.117'; use Mouse; extends 'Config::Model::Exception::User'; @@ -227,7 +227,7 @@ sub full_message { } package Config::Model::Exception::UnavailableElement; -$Config::Model::Exception::UnavailableElement::VERSION = '2.116'; +$Config::Model::Exception::UnavailableElement::VERSION = '2.117'; use Mouse; extends 'Config::Model::Exception::User'; @@ -258,7 +258,7 @@ sub full_message { } package Config::Model::Exception::AncestorClass; -$Config::Model::Exception::AncestorClass::VERSION = '2.116'; +$Config::Model::Exception::AncestorClass::VERSION = '2.117'; use Mouse; extends 'Config::Model::Exception::User'; @@ -266,7 +266,7 @@ sub _desc { 'unknown ancestor class'} package Config::Model::Exception::ObsoleteElement; -$Config::Model::Exception::ObsoleteElement::VERSION = '2.116'; +$Config::Model::Exception::ObsoleteElement::VERSION = '2.117'; use Mouse; extends 'Config::Model::Exception::User'; @@ -291,7 +291,7 @@ sub full_message { } package Config::Model::Exception::UnknownElement; -$Config::Model::Exception::UnknownElement::VERSION = '2.116'; +$Config::Model::Exception::UnknownElement::VERSION = '2.117'; use Carp; use Mouse; @@ -368,14 +368,14 @@ sub full_message { } package Config::Model::Exception::WarpError; -$Config::Model::Exception::WarpError::VERSION = '2.116'; +$Config::Model::Exception::WarpError::VERSION = '2.117'; use Mouse; extends 'Config::Model::Exception::User'; sub _desc { 'warp error'} package Config::Model::Exception::Fatal; -$Config::Model::Exception::Fatal::VERSION = '2.116'; +$Config::Model::Exception::Fatal::VERSION = '2.117'; use Mouse; extends 'Config::Model::Exception::Any'; @@ -383,7 +383,7 @@ sub _desc { 'fatal error' } package Config::Model::Exception::UnknownId; -$Config::Model::Exception::UnknownId::VERSION = '2.116'; +$Config::Model::Exception::UnknownId::VERSION = '2.117'; use Mouse; extends 'Config::Model::Exception::User'; @@ -417,7 +417,7 @@ sub full_message { } package Config::Model::Exception::WrongValue; -$Config::Model::Exception::WrongValue::VERSION = '2.116'; +$Config::Model::Exception::WrongValue::VERSION = '2.117'; use Mouse; extends 'Config::Model::Exception::User'; @@ -425,7 +425,7 @@ sub _desc { 'wrong value'}; package Config::Model::Exception::WrongType; -$Config::Model::Exception::WrongType::VERSION = '2.116'; +$Config::Model::Exception::WrongType::VERSION = '2.117'; use Mouse; extends 'Config::Model::Exception::User'; @@ -459,20 +459,24 @@ sub full_message { } package Config::Model::Exception::ConfigFile; -$Config::Model::Exception::ConfigFile::VERSION = '2.116'; +$Config::Model::Exception::ConfigFile::VERSION = '2.117'; use Mouse; extends 'Config::Model::Exception::User'; sub _desc { 'error in configuration file' } package Config::Model::Exception::ConfigFile::Missing; -$Config::Model::Exception::ConfigFile::Missing::VERSION = '2.116'; +$Config::Model::Exception::ConfigFile::Missing::VERSION = '2.117'; use Mouse; +use Mouse::Util::TypeConstraints; + extends 'Config::Model::Exception::ConfigFile'; sub _desc { 'missing configuration file'} -has file => (is => 'rw', isa => 'Str'); +subtype 'ExcpPathTiny', as 'Object', where {$_->isa('Path::Tiny')} ; + +has file => (is => 'rw', isa => 'Str | ExcpPathTiny' ); sub full_message { my $self = shift; @@ -481,14 +485,14 @@ sub full_message { } package Config::Model::Exception::Formula; -$Config::Model::Exception::Formula::VERSION = '2.116'; +$Config::Model::Exception::Formula::VERSION = '2.117'; use Mouse; extends 'Config::Model::Exception::Model'; sub _desc { 'error in computation formula of the configuration model'} package Config::Model::Exception::Internal; -$Config::Model::Exception::Internal::VERSION = '2.116'; +$Config::Model::Exception::Internal::VERSION = '2.117'; use Mouse; extends 'Config::Model::Exception::Fatal'; @@ -510,7 +514,7 @@ Config::Model::Exception - Exception mechanism for configuration model =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -568,7 +572,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/FuseUI.pm b/lib/Config/Model/FuseUI.pm index ddedb09..92dac3e 100644 --- a/lib/Config/Model/FuseUI.pm +++ b/lib/Config/Model/FuseUI.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::FuseUI; -$Config::Model::FuseUI::VERSION = '2.116'; +$Config::Model::FuseUI::VERSION = '2.117'; # there's no Singleton with Mouse use Mouse; @@ -327,7 +327,7 @@ Config::Model::FuseUI - Fuse virtual file interface for Config::Model =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -428,7 +428,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/HashId.pm b/lib/Config/Model/HashId.pm index 5eb055f..e428db1 100644 --- a/lib/Config/Model/HashId.pm +++ b/lib/Config/Model/HashId.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::HashId; -$Config::Model::HashId::VERSION = '2.116'; +$Config::Model::HashId::VERSION = '2.117'; use Mouse; use 5.10.1; @@ -158,6 +158,7 @@ sub _store { my ( $self, $key, $value ) = @_; push @{ $self->{list} }, $key unless exists $self->{data}{$key}; + $self->notify_change(note => "added entry $key") if $self->write_empty_value; return $self->{data}{$key} = $value; } @@ -538,7 +539,7 @@ Config::Model::HashId - Handle hash element for configuration model =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -656,7 +657,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/IdElementReference.pm b/lib/Config/Model/IdElementReference.pm index ea2d6fa..b0dfc8a 100644 --- a/lib/Config/Model/IdElementReference.pm +++ b/lib/Config/Model/IdElementReference.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::IdElementReference; -$Config::Model::IdElementReference::VERSION = '2.116'; +$Config::Model::IdElementReference::VERSION = '2.117'; use Mouse; use Carp; @@ -190,7 +190,7 @@ Config::Model::IdElementReference - Refer to id element(s) and extract keys =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -378,7 +378,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/Instance.pm b/lib/Config/Model/Instance.pm index f8e1dfd..615205c 100644 --- a/lib/Config/Model/Instance.pm +++ b/lib/Config/Model/Instance.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::Instance; -$Config::Model::Instance::VERSION = '2.116'; +$Config::Model::Instance::VERSION = '2.117'; #use Scalar::Util qw(weaken) ; use strict; @@ -661,7 +661,7 @@ Config::Model::Instance - Instance of configuration tree =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -1065,7 +1065,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/Iterator.pm b/lib/Config/Model/Iterator.pm index 5ee0d36..5e681a0 100644 --- a/lib/Config/Model/Iterator.pm +++ b/lib/Config/Model/Iterator.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::Iterator; -$Config::Model::Iterator::VERSION = '2.116'; +$Config::Model::Iterator::VERSION = '2.117'; use Carp; use strict; use warnings; @@ -281,7 +281,7 @@ Config::Model::Iterator - Iterates forward or backward a configuration tree =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -464,7 +464,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/ListId.pm b/lib/Config/Model/ListId.pm index 72ed2f9..56458d3 100644 --- a/lib/Config/Model/ListId.pm +++ b/lib/Config/Model/ListId.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::ListId; -$Config::Model::ListId::VERSION = '2.116'; +$Config::Model::ListId::VERSION = '2.117'; use 5.10.1; use Mouse; @@ -509,7 +509,7 @@ Config::Model::ListId - Handle list element for configuration model =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -677,7 +677,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/Lister.pm b/lib/Config/Model/Lister.pm index a7a2fa3..0862a91 100644 --- a/lib/Config/Model/Lister.pm +++ b/lib/Config/Model/Lister.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::Lister; -$Config::Model::Lister::VERSION = '2.116'; +$Config::Model::Lister::VERSION = '2.117'; use strict; use warnings; use Exporter; @@ -92,7 +92,7 @@ Config::Model::Lister - List available models and applications =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -151,7 +151,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/Loader.pm b/lib/Config/Model/Loader.pm index be6ecab..13ea258 100644 --- a/lib/Config/Model/Loader.pm +++ b/lib/Config/Model/Loader.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::Loader; -$Config::Model::Loader::VERSION = '2.116'; +$Config::Model::Loader::VERSION = '2.117'; use Carp; use strict; use warnings; @@ -898,7 +898,7 @@ Config::Model::Loader - Load serialized data into config tree =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -1312,7 +1312,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/Manual/ModelCreationAdvanced.pod b/lib/Config/Model/Manual/ModelCreationAdvanced.pod index c430100..bf08891 100644 --- a/lib/Config/Model/Manual/ModelCreationAdvanced.pod +++ b/lib/Config/Model/Manual/ModelCreationAdvanced.pod @@ -13,7 +13,7 @@ Config::Model::Manual::ModelCreationAdvanced - Creating a model with advanced fe =head1 VERSION -version 2.116 +version 2.117 =head1 Introduction @@ -293,7 +293,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/Manual/ModelCreationIntroduction.pod b/lib/Config/Model/Manual/ModelCreationIntroduction.pod index 7dff033..e3fef96 100644 --- a/lib/Config/Model/Manual/ModelCreationIntroduction.pod +++ b/lib/Config/Model/Manual/ModelCreationIntroduction.pod @@ -13,7 +13,7 @@ Config::Model::Manual::ModelCreationIntroduction - Introduction to model creatio =head1 VERSION -version 2.116 +version 2.117 =head1 Introduction @@ -832,7 +832,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/Node.pm b/lib/Config/Model/Node.pm index 6cb73a0..160afa7 100644 --- a/lib/Config/Model/Node.pm +++ b/lib/Config/Model/Node.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::Node; -$Config::Model::Node::VERSION = '2.116'; +$Config::Model::Node::VERSION = '2.117'; use Mouse; with "Config::Model::Role::NodeLoader"; @@ -1208,7 +1208,7 @@ Config::Model::Node - Class for configuration tree node =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -1937,7 +1937,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/ObjTreeScanner.pm b/lib/Config/Model/ObjTreeScanner.pm index c3e05fb..ca6adf1 100644 --- a/lib/Config/Model/ObjTreeScanner.pm +++ b/lib/Config/Model/ObjTreeScanner.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::ObjTreeScanner; -$Config::Model::ObjTreeScanner::VERSION = '2.116'; +$Config::Model::ObjTreeScanner::VERSION = '2.117'; use strict; use Config::Model::Exception; use Scalar::Util qw/blessed/; @@ -285,7 +285,7 @@ Config::Model::ObjTreeScanner - Scan config tree and perform call-backs for each =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -699,7 +699,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/Report.pm b/lib/Config/Model/Report.pm index 8f50d5e..bae7a0c 100644 --- a/lib/Config/Model/Report.pm +++ b/lib/Config/Model/Report.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::Report; -$Config::Model::Report::VERSION = '2.116'; +$Config::Model::Report::VERSION = '2.117'; use Carp; use strict; use warnings; @@ -90,7 +90,7 @@ Config::Model::Report - Reports data from config tree =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -221,7 +221,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/Role/ComputeFunction.pm b/lib/Config/Model/Role/ComputeFunction.pm index 9ce783b..92061af 100644 --- a/lib/Config/Model/Role/ComputeFunction.pm +++ b/lib/Config/Model/Role/ComputeFunction.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::Role::ComputeFunction; -$Config::Model::Role::ComputeFunction::VERSION = '2.116'; +$Config::Model::Role::ComputeFunction::VERSION = '2.117'; # ABSTRACT: compute &index or &element functions use Mouse::Role; @@ -88,7 +88,7 @@ Config::Model::Role::ComputeFunction - compute &index or &element functions =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -145,7 +145,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/Role/FileHandler.pm b/lib/Config/Model/Role/FileHandler.pm index 1afc826..90a325e 100644 --- a/lib/Config/Model/Role/FileHandler.pm +++ b/lib/Config/Model/Role/FileHandler.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::Role::FileHandler; -$Config::Model::Role::FileHandler::VERSION = '2.116'; +$Config::Model::Role::FileHandler::VERSION = '2.117'; # ABSTRACT: role to read or write configuration files use strict; @@ -18,9 +18,9 @@ use 5.10.0; use Mouse::Util; use Log::Log4perl qw(get_logger :levels); +use Path::Tiny; use Mouse::Role; -requires 'config_dir'; my $logger = get_logger("FileHandler"); @@ -28,6 +28,11 @@ my $logger = get_logger("FileHandler"); my $__test_home = ''; sub _set_test_home { $__test_home = shift; } +# Configuration directory where to read and write files. This value +# does not override the configuration directory specified in the model +# data passed to read and write functions. +has config_dir => ( is => 'ro', isa => 'Maybe[Str]', required => 0 ); + sub get_tuned_config_dir { my ($self, %args) = @_; @@ -38,9 +43,9 @@ sub get_tuned_config_dir { $dir =~ s/^~/$home/; } - $dir .= '/' if $dir and $dir !~ m(/$); - - return $dir; + return $args{root} ? path($args{root})->child($dir) + : $dir ? path($dir) + : path ('.'); } 1; @@ -57,7 +62,7 @@ Config::Model::Role::FileHandler - role to read or write configuration files =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -73,7 +78,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/Role/Grab.pm b/lib/Config/Model/Role/Grab.pm index 5ad50df..b0b1fba 100644 --- a/lib/Config/Model/Role/Grab.pm +++ b/lib/Config/Model/Role/Grab.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::Role::Grab; -$Config::Model::Role::Grab::VERSION = '2.116'; +$Config::Model::Role::Grab::VERSION = '2.117'; # ABSTRACT: Role to grab data from elsewhere in the tree use Mouse::Role; @@ -366,7 +366,7 @@ Config::Model::Role::Grab - Role to grab data from elsewhere in the tree =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -500,7 +500,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/Role/HelpAsText.pm b/lib/Config/Model/Role/HelpAsText.pm index 5617931..280afe3 100644 --- a/lib/Config/Model/Role/HelpAsText.pm +++ b/lib/Config/Model/Role/HelpAsText.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::Role::HelpAsText; -$Config::Model::Role::HelpAsText::VERSION = '2.116'; +$Config::Model::Role::HelpAsText::VERSION = '2.117'; # ABSTRACT: Translate element help from pod to text use Mouse::Role; @@ -57,7 +57,7 @@ Config::Model::Role::HelpAsText - Translate element help from pod to text =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -88,7 +88,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/Role/NodeLoader.pm b/lib/Config/Model/Role/NodeLoader.pm index ae6c4a0..b485614 100644 --- a/lib/Config/Model/Role/NodeLoader.pm +++ b/lib/Config/Model/Role/NodeLoader.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::Role::NodeLoader; -$Config::Model::Role::NodeLoader::VERSION = '2.116'; +$Config::Model::Role::NodeLoader::VERSION = '2.117'; # ABSTRACT: Load Node element in configuration tree use Mouse::Role; @@ -50,7 +50,7 @@ Config::Model::Role::NodeLoader - Load Node element in configuration tree =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -76,7 +76,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/Role/WarpMaster.pm b/lib/Config/Model/Role/WarpMaster.pm index 94dcb00..d64f5af 100644 --- a/lib/Config/Model/Role/WarpMaster.pm +++ b/lib/Config/Model/Role/WarpMaster.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::Role::WarpMaster; -$Config::Model::Role::WarpMaster::VERSION = '2.116'; +$Config::Model::Role::WarpMaster::VERSION = '2.117'; # ABSTRACT: register and trigger a warped element use Mouse::Role; @@ -106,7 +106,7 @@ Config::Model::Role::WarpMaster - register and trigger a warped element =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -152,7 +152,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/SearchElement.pm b/lib/Config/Model/SearchElement.pm index 14b46be..feb92eb 100644 --- a/lib/Config/Model/SearchElement.pm +++ b/lib/Config/Model/SearchElement.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::SearchElement; -$Config::Model::SearchElement::VERSION = '2.116'; +$Config::Model::SearchElement::VERSION = '2.117'; use Log::Log4perl qw(get_logger :levels); use Carp; use strict; @@ -333,7 +333,7 @@ Config::Model::SearchElement - Search an element in a configuration model =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -579,7 +579,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/SimpleUI.pm b/lib/Config/Model/SimpleUI.pm index 4493436..cf837b9 100644 --- a/lib/Config/Model/SimpleUI.pm +++ b/lib/Config/Model/SimpleUI.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::SimpleUI; -$Config::Model::SimpleUI::VERSION = '2.116'; +$Config::Model::SimpleUI::VERSION = '2.117'; use Carp; use 5.010; use strict; @@ -338,7 +338,7 @@ Config::Model::SimpleUI - Simple interface for Config::Model =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -563,7 +563,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/TermUI.pm b/lib/Config/Model/TermUI.pm index 89f28d3..b18c0f7 100644 --- a/lib/Config/Model/TermUI.pm +++ b/lib/Config/Model/TermUI.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::TermUI; -$Config::Model::TermUI::VERSION = '2.116'; +$Config::Model::TermUI::VERSION = '2.117'; use Carp; use utf8; # so literals and identifiers can be in UTF-8 use v5.12; # or later to get "unicode_strings" feature @@ -238,7 +238,7 @@ Config::Model::TermUI - Interactive command line interface for cme =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -411,7 +411,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/TreeSearcher.pm b/lib/Config/Model/TreeSearcher.pm index 73ab793..29e9657 100644 --- a/lib/Config/Model/TreeSearcher.pm +++ b/lib/Config/Model/TreeSearcher.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::TreeSearcher; -$Config::Model::TreeSearcher::VERSION = '2.116'; +$Config::Model::TreeSearcher::VERSION = '2.117'; use Mouse; use Mouse::Util::TypeConstraints; @@ -147,7 +147,7 @@ Config::Model::TreeSearcher - Search tree for match in value, description... =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -249,7 +249,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/Utils/GenClassPod.pm b/lib/Config/Model/Utils/GenClassPod.pm index facf3e8..4d6c3c1 100644 --- a/lib/Config/Model/Utils/GenClassPod.pm +++ b/lib/Config/Model/Utils/GenClassPod.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::Utils::GenClassPod; -$Config::Model::Utils::GenClassPod::VERSION = '2.116'; +$Config::Model::Utils::GenClassPod::VERSION = '2.117'; # ABSTRACT: generate pod documentation from configuration models use strict; @@ -57,7 +57,7 @@ Config::Model::Utils::GenClassPod - generate pod documentation from configuratio =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -86,7 +86,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/Value.pm b/lib/Config/Model/Value.pm index 5c47ceb..646d7cc 100644 --- a/lib/Config/Model/Value.pm +++ b/lib/Config/Model/Value.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::Value; -$Config::Model::Value::VERSION = '2.116'; +$Config::Model::Value::VERSION = '2.117'; use 5.10.1; use Mouse; @@ -1853,7 +1853,7 @@ Config::Model::Value - Strongly typed configuration value =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -2896,7 +2896,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/Value/LayeredInclude.pm b/lib/Config/Model/Value/LayeredInclude.pm index da7dc6f..3ffe938 100644 --- a/lib/Config/Model/Value/LayeredInclude.pm +++ b/lib/Config/Model/Value/LayeredInclude.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::Value::LayeredInclude; -$Config::Model::Value::LayeredInclude::VERSION = '2.116'; +$Config::Model::Value::LayeredInclude::VERSION = '2.117'; use 5.010; use strict; use warnings; @@ -108,7 +108,7 @@ Config::Model::Value::LayeredInclude - Include a sub layer configuration =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -164,7 +164,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/ValueComputer.pm b/lib/Config/Model/ValueComputer.pm index 0f3af97..75517c4 100644 --- a/lib/Config/Model/ValueComputer.pm +++ b/lib/Config/Model/ValueComputer.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::ValueComputer; -$Config::Model::ValueComputer::VERSION = '2.116'; +$Config::Model::ValueComputer::VERSION = '2.117'; use Mouse; use MouseX::StrictConstructor; @@ -549,7 +549,7 @@ Config::Model::ValueComputer - Provides configuration value computation =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -1014,7 +1014,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/WarpedNode.pm b/lib/Config/Model/WarpedNode.pm index f684562..5c04ee8 100644 --- a/lib/Config/Model/WarpedNode.pm +++ b/lib/Config/Model/WarpedNode.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::WarpedNode; -$Config::Model::WarpedNode::VERSION = '2.116'; +$Config::Model::WarpedNode::VERSION = '2.117'; use Mouse; use Carp qw(cluck croak); @@ -313,7 +313,7 @@ Config::Model::WarpedNode - Node that change config class properties =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -560,7 +560,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/Warper.pm b/lib/Config/Model/Warper.pm index b2e36a4..b439d80 100644 --- a/lib/Config/Model/Warper.pm +++ b/lib/Config/Model/Warper.pm @@ -1,14 +1,14 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # # The GNU Lesser General Public License, Version 2.1, February 1999 # package Config::Model::Warper; -$Config::Model::Warper::VERSION = '2.116'; +$Config::Model::Warper::VERSION = '2.117'; use Mouse; use Log::Log4perl qw(get_logger :levels); @@ -620,7 +620,7 @@ Config::Model::Warper - Warp tree properties =head1 VERSION -version 2.116 +version 2.117 =head1 SYNOPSIS @@ -874,7 +874,7 @@ Dominique Dumont =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2005-2017 by Dominique Dumont. +This software is Copyright (c) 2005-2018 by Dominique Dumont. This is free software, licensed under: diff --git a/lib/Config/Model/models/Fstab.pl b/lib/Config/Model/models/Fstab.pl index 77bddd1..51347a0 100644 --- a/lib/Config/Model/models/Fstab.pl +++ b/lib/Config/Model/models/Fstab.pl @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/lib/Config/Model/models/Fstab/CommonOptions.pl b/lib/Config/Model/models/Fstab/CommonOptions.pl index d201fff..509e94c 100644 --- a/lib/Config/Model/models/Fstab/CommonOptions.pl +++ b/lib/Config/Model/models/Fstab/CommonOptions.pl @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/lib/Config/Model/models/Fstab/Ext2FsOpt.pl b/lib/Config/Model/models/Fstab/Ext2FsOpt.pl index 244def9..0d04ec9 100644 --- a/lib/Config/Model/models/Fstab/Ext2FsOpt.pl +++ b/lib/Config/Model/models/Fstab/Ext2FsOpt.pl @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/lib/Config/Model/models/Fstab/Ext3FsOpt.pl b/lib/Config/Model/models/Fstab/Ext3FsOpt.pl index 9e547be..33ed9eb 100644 --- a/lib/Config/Model/models/Fstab/Ext3FsOpt.pl +++ b/lib/Config/Model/models/Fstab/Ext3FsOpt.pl @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/lib/Config/Model/models/Fstab/Ext4FsOpt.pl b/lib/Config/Model/models/Fstab/Ext4FsOpt.pl index 373832b..fa95e8b 100644 --- a/lib/Config/Model/models/Fstab/Ext4FsOpt.pl +++ b/lib/Config/Model/models/Fstab/Ext4FsOpt.pl @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/lib/Config/Model/models/Fstab/FsLine.pl b/lib/Config/Model/models/Fstab/FsLine.pl index 1d943fe..396a4ac 100644 --- a/lib/Config/Model/models/Fstab/FsLine.pl +++ b/lib/Config/Model/models/Fstab/FsLine.pl @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/lib/Config/Model/models/Fstab/Iso9660_Opt.pl b/lib/Config/Model/models/Fstab/Iso9660_Opt.pl index 1bf968a..05a54bb 100644 --- a/lib/Config/Model/models/Fstab/Iso9660_Opt.pl +++ b/lib/Config/Model/models/Fstab/Iso9660_Opt.pl @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/lib/Config/Model/models/Fstab/NoneOptions.pl b/lib/Config/Model/models/Fstab/NoneOptions.pl index 10e3a16..16e1758 100644 --- a/lib/Config/Model/models/Fstab/NoneOptions.pl +++ b/lib/Config/Model/models/Fstab/NoneOptions.pl @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/lib/Config/Model/models/Fstab/SwapOptions.pl b/lib/Config/Model/models/Fstab/SwapOptions.pl index f02b7ce..30c38c1 100644 --- a/lib/Config/Model/models/Fstab/SwapOptions.pl +++ b/lib/Config/Model/models/Fstab/SwapOptions.pl @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/lib/Config/Model/models/Fstab/UsbFsOptions.pl b/lib/Config/Model/models/Fstab/UsbFsOptions.pl index ddfb1b6..d77b562 100644 --- a/lib/Config/Model/models/Fstab/UsbFsOptions.pl +++ b/lib/Config/Model/models/Fstab/UsbFsOptions.pl @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/lib/Config/Model/models/Multistrap.pl b/lib/Config/Model/models/Multistrap.pl index 8ceb8d9..0f95fb9 100644 --- a/lib/Config/Model/models/Multistrap.pl +++ b/lib/Config/Model/models/Multistrap.pl @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/lib/Config/Model/models/Multistrap/Section.pl b/lib/Config/Model/models/Multistrap/Section.pl index 0215d07..0650eaf 100644 --- a/lib/Config/Model/models/Multistrap/Section.pl +++ b/lib/Config/Model/models/Multistrap/Section.pl @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/lib/Config/Model/models/PopCon.pl b/lib/Config/Model/models/PopCon.pl index 5c2633a..ede1063 100644 --- a/lib/Config/Model/models/PopCon.pl +++ b/lib/Config/Model/models/PopCon.pl @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/t/annotation.t b/t/annotation.t index d8f0974..3d5e310 100644 --- a/t/annotation.t +++ b/t/annotation.t @@ -72,7 +72,7 @@ foreach (@annotate) { } say "pending changes:\n".$inst->list_changes if $trace; -is( $inst->needs_save, 6, "verify instance needs_save status after storing only annotations" ); +is( $inst->needs_save, 5, "verify instance needs_save status after storing only annotations" ); $inst->clear_changes; is( $root->grab("std_id:ab X")->annotation('to delete'), 'to delete', "test clear annotation" ); diff --git a/t/array_id.t b/t/array_id.t index eb0aec0..c8fdf32 100644 --- a/t/array_id.t +++ b/t/array_id.t @@ -139,7 +139,7 @@ is( $inst->needs_save, 0, "verify instance needs_save status after element creat is( $b->fetch_with_id(1)->store('foo'), 1, "stored in 1" ); is( $b->fetch_with_id(0)->store('baz'), 1, "stored in 0" ); is( $b->fetch_with_id(2)->store('bar'), 1, "stored in 2" ); -is( $inst->needs_save, 6, "verify instance needs_save status after storing into element" ); +is( $inst->needs_save, 3, "verify instance needs_save status after storing into element" ); print join( "\n", $inst->list_changes("\n") ), "\n" if $trace; throws_ok { $b->fetch_with_id(124)->store('baz'); } qr/Index 124 > max_index limit 123/, diff --git a/t/hash_id_of_values.t b/t/hash_id_of_values.t index 10bd458..1e5b953 100644 --- a/t/hash_id_of_values.t +++ b/t/hash_id_of_values.t @@ -43,6 +43,7 @@ $model->create_config_class( type => 'hash', class => 'Config::Model::HashId', # default index_type => 'integer', + write_empty_value => 1, # hash boundaries min => 1, @@ -332,7 +333,7 @@ eq_or_diff( [ $oh->fetch_all_indexes ], is( $oh->fetch_with_id('x')->fetch, '2x', "Check copied value" ); $oh->copy(qw/x d/); -is( $inst->needs_save, 2, "verify instance needs_save status after copy" ); +is( $inst->needs_save, 1, "verify instance needs_save status after copy" ); print scalar $inst->list_changes, "\n" if $trace; $inst->clear_changes; diff --git a/t/lib/Config/Model/models/Master.pl b/t/lib/Config/Model/models/Master.pl index 9b77c2e..66126b0 100644 --- a/t/lib/Config/Model/models/Master.pl +++ b/t/lib/Config/Model/models/Master.pl @@ -2,7 +2,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/t/lib/DummyNode.pm b/t/lib/DummyNode.pm index 02eda74..79ab683 100644 --- a/t/lib/DummyNode.pm +++ b/t/lib/DummyNode.pm @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/t/lib/MyTestLib.pm b/t/lib/MyTestLib.pm index ee1ff40..331e7aa 100644 --- a/t/lib/MyTestLib.pm +++ b/t/lib/MyTestLib.pm @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/t/lib/dump_load_model.pm b/t/lib/dump_load_model.pm index 6501995..d3ea619 100644 --- a/t/lib/dump_load_model.pm +++ b/t/lib/dump_load_model.pm @@ -2,7 +2,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/t/lib/test_ini_backend_model.pl b/t/lib/test_ini_backend_model.pl index 58d6318..80254d8 100644 --- a/t/lib/test_ini_backend_model.pl +++ b/t/lib/test_ini_backend_model.pl @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/t/lib/test_yaml_model.pl b/t/lib/test_yaml_model.pl index fc3a1c0..c0640b3 100644 --- a/t/lib/test_yaml_model.pl +++ b/t/lib/test_yaml_model.pl @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/t/model_tests.d/backend-cds-test-conf.pl b/t/model_tests.d/backend-cds-test-conf.pl index c921dd2..e2cb869 100644 --- a/t/model_tests.d/backend-cds-test-conf.pl +++ b/t/model_tests.d/backend-cds-test-conf.pl @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/t/model_tests.d/backend-ini-test-conf.pl b/t/model_tests.d/backend-ini-test-conf.pl index d37f076..7661f85 100644 --- a/t/model_tests.d/backend-ini-test-conf.pl +++ b/t/model_tests.d/backend-ini-test-conf.pl @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/t/model_tests.d/backend-json-test-conf.pl b/t/model_tests.d/backend-json-test-conf.pl index 09b3777..943ab79 100644 --- a/t/model_tests.d/backend-json-test-conf.pl +++ b/t/model_tests.d/backend-json-test-conf.pl @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/t/model_tests.d/backend-key-value-test-conf.pl b/t/model_tests.d/backend-key-value-test-conf.pl index 7d013c3..f40552a 100644 --- a/t/model_tests.d/backend-key-value-test-conf.pl +++ b/t/model_tests.d/backend-key-value-test-conf.pl @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/t/model_tests.d/backend-perl-test-conf.pl b/t/model_tests.d/backend-perl-test-conf.pl index 33f44b5..6e792e2 100644 --- a/t/model_tests.d/backend-perl-test-conf.pl +++ b/t/model_tests.d/backend-perl-test-conf.pl @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/t/model_tests.d/backend-plainfile-test-conf.pl b/t/model_tests.d/backend-plainfile-test-conf.pl index 1084d89..0d89cec 100644 --- a/t/model_tests.d/backend-plainfile-test-conf.pl +++ b/t/model_tests.d/backend-plainfile-test-conf.pl @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/t/model_tests.d/backend-shellvar-test-conf.pl b/t/model_tests.d/backend-shellvar-test-conf.pl index 64f1384..d64cd3f 100644 --- a/t/model_tests.d/backend-shellvar-test-conf.pl +++ b/t/model_tests.d/backend-shellvar-test-conf.pl @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/t/model_tests.d/backend-yaml-data-test-conf.pl b/t/model_tests.d/backend-yaml-data-test-conf.pl index 107d0ab..d9d432b 100644 --- a/t/model_tests.d/backend-yaml-data-test-conf.pl +++ b/t/model_tests.d/backend-yaml-data-test-conf.pl @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/t/model_tests.d/backend-yaml-test-conf.pl b/t/model_tests.d/backend-yaml-test-conf.pl index ba342dc..d382290 100644 --- a/t/model_tests.d/backend-yaml-test-conf.pl +++ b/t/model_tests.d/backend-yaml-test-conf.pl @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/t/model_tests.d/fstab-test-conf.pl b/t/model_tests.d/fstab-test-conf.pl index d0ad736..8eaaed3 100644 --- a/t/model_tests.d/fstab-test-conf.pl +++ b/t/model_tests.d/fstab-test-conf.pl @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/t/model_tests.d/layer-examples/mini/etc/foo-config.pl b/t/model_tests.d/layer-examples/mini/etc/foo-config.pl index 75912ea..a4a5b2e 100644 --- a/t/model_tests.d/layer-examples/mini/etc/foo-config.pl +++ b/t/model_tests.d/layer-examples/mini/etc/foo-config.pl @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/t/model_tests.d/layer-examples/mini/home/joe/foo/config.pl b/t/model_tests.d/layer-examples/mini/home/joe/foo/config.pl index d8eeceb..7ffed1a 100644 --- a/t/model_tests.d/layer-examples/mini/home/joe/foo/config.pl +++ b/t/model_tests.d/layer-examples/mini/home/joe/foo/config.pl @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/t/model_tests.d/layer-test-conf.pl b/t/model_tests.d/layer-test-conf.pl index 4b31c0b..f1b9091 100644 --- a/t/model_tests.d/layer-test-conf.pl +++ b/t/model_tests.d/layer-test-conf.pl @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/t/model_tests.d/multi-ini-test-conf.pl b/t/model_tests.d/multi-ini-test-conf.pl index 335de98..c68c542 100644 --- a/t/model_tests.d/multi-ini-test-conf.pl +++ b/t/model_tests.d/multi-ini-test-conf.pl @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/t/model_tests.d/multistrap-test-conf.pl b/t/model_tests.d/multistrap-test-conf.pl index e343dff..bf60f37 100644 --- a/t/model_tests.d/multistrap-test-conf.pl +++ b/t/model_tests.d/multistrap-test-conf.pl @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/t/model_tests.d/popcon-test-conf.pl b/t/model_tests.d/popcon-test-conf.pl index d3d65f7..81b8d20 100644 --- a/t/model_tests.d/popcon-test-conf.pl +++ b/t/model_tests.d/popcon-test-conf.pl @@ -1,7 +1,7 @@ # # This file is part of Config-Model # -# This software is Copyright (c) 2005-2017 by Dominique Dumont. +# This software is Copyright (c) 2005-2018 by Dominique Dumont. # # This is free software, licensed under: # diff --git a/t/value.t b/t/value.t index e4da168..038c39a 100644 --- a/t/value.t +++ b/t/value.t @@ -784,7 +784,7 @@ note "test replace_follow"; is( $inst->needs_save, 0, "check needs_save after simple fetch" ); $root->load('replacement_hash:foo=repfoo replacement_hash:bar=repbar'); - is( $inst->needs_save, 4, "check needs_save after load" ); + is( $inst->needs_save, 2, "check needs_save after load" ); $inst->clear_changes; is( $wrf->fetch, 'repfoo', "check replacement_hash with foo (after replacement)" ); diff --git a/t/value_compute.t b/t/value_compute.t index 86c6f86..d3127a4 100644 --- a/t/value_compute.t +++ b/t/value_compute.t @@ -580,7 +580,7 @@ is( $inst->needs_save, 0, "check needs save before migrate" ); is( $root->grab_value( step => 'Upstream-Maintainer:0', check => 'no' ), 'foo', "check migrate_from first stage" ); is( $root->grab_value( step => 'Upstream-Contact:0' ), 'foo', "check migrate_from second stage" ); -is( $inst->needs_save, 4, "check needs save before migrate" ); +is( $inst->needs_save, 2, "check needs save after migrate" ); print join( "\n", $inst->list_changes("\n") ), "\n" if $trace; $root->fetch_element( name => 'Original-Source-Location', check => 'no' )->store('foobar'); -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libconfig-model-perl.git _______________________________________________ Pkg-perl-cvs-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits
