Update upstream source from tag 'upstream/2.134'
Update to upstream version '2.134'
with Debian dir e3d2df61de6350e4a09ea6f16cbdc45eb8df43a0
gregor herrmann
3 years ago
24 | 24 |
dist_author => 'Dominique Dumont (ddumont at cpan dot org)',
|
25 | 25 |
|
26 | 26 |
'build_requires' => {
|
27 | |
'Config::Model::BackendMgr' => '0',
|
28 | |
'Config::Model::Tester' => '3.006',
|
|
27 |
'Config::Model::Tester' => '4.001',
|
29 | 28 |
'Config::Model::Tester::Setup' => '0',
|
30 | 29 |
'ExtUtils::testlib' => '0',
|
31 | 30 |
'Module::Build' => '0.34',
|
|
0 |
2.134 2021-01-22
|
|
1 |
|
|
2 |
* fail test if object can be loaded with YAML
|
|
3 |
* use new style of model_test spec
|
|
4 |
(tests require Config::Model::Tester 4.001)
|
|
5 |
|
0 | 6 |
2.133 2018-12-29
|
1 | 7 |
|
2 | 8 |
* fix read/write of UTF-8 data
|
0 | |
# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.012.
|
|
0 |
# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.017.
|
1 | 1 |
Build.PL
|
2 | 2 |
CONTRIBUTING.md
|
3 | 3 |
Changes
|
|
11 | 11 |
lib/Config/Model/Backend/Yaml.pm
|
12 | 12 |
t/README.md
|
13 | 13 |
t/backend_yaml.t
|
|
14 |
t/lib/SneakyObject.pm
|
14 | 15 |
t/lib/test_yaml_model.pl
|
15 | 16 |
t/model_tests.d/backend-yaml-data-examples/basic
|
16 | 17 |
t/model_tests.d/backend-yaml-data-examples/utf8_data
|
3 | 3 |
"Dominique Dumont"
|
4 | 4 |
],
|
5 | 5 |
"dynamic_config" : 0,
|
6 | |
"generated_by" : "Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010",
|
|
6 |
"generated_by" : "Dist::Zilla version 6.017, CPAN::Meta::Converter version 2.150010",
|
7 | 7 |
"license" : [
|
8 | 8 |
"lgpl_2_1"
|
9 | 9 |
],
|
|
42 | 42 |
},
|
43 | 43 |
"test" : {
|
44 | 44 |
"requires" : {
|
45 | |
"Config::Model::BackendMgr" : "0",
|
46 | |
"Config::Model::Tester" : "3.006",
|
|
45 |
"Config::Model::Tester" : "4.001",
|
47 | 46 |
"Config::Model::Tester::Setup" : "0",
|
48 | 47 |
"ExtUtils::testlib" : "0",
|
49 | 48 |
"Path::Tiny" : "0",
|
|
67 | 66 |
"web" : "http://github.com/dod38fr/config-model-backend-yaml"
|
68 | 67 |
}
|
69 | 68 |
},
|
70 | |
"version" : "2.133",
|
71 | |
"x_generated_by_perl" : "v5.28.1",
|
72 | |
"x_serialization_backend" : "Cpanel::JSON::XS version 4.08"
|
|
69 |
"version" : "2.134",
|
|
70 |
"x_generated_by_perl" : "v5.32.0",
|
|
71 |
"x_serialization_backend" : "Cpanel::JSON::XS version 4.25",
|
|
72 |
"x_spdx_expression" : "LGPL-2.1"
|
73 | 73 |
}
|
74 | 74 |
|
2 | 2 |
author:
|
3 | 3 |
- 'Dominique Dumont'
|
4 | 4 |
build_requires:
|
5 | |
Config::Model::BackendMgr: '0'
|
6 | |
Config::Model::Tester: '3.006'
|
|
5 |
Config::Model::Tester: '4.001'
|
7 | 6 |
Config::Model::Tester::Setup: '0'
|
8 | 7 |
ExtUtils::testlib: '0'
|
9 | 8 |
Module::Build: '0.34'
|
|
15 | 14 |
configure_requires:
|
16 | 15 |
Module::Build: '0.34'
|
17 | 16 |
dynamic_config: 0
|
18 | |
generated_by: 'Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010'
|
|
17 |
generated_by: 'Dist::Zilla version 6.017, CPAN::Meta::Converter version 2.150010'
|
19 | 18 |
license: lgpl
|
20 | 19 |
meta-spec:
|
21 | 20 |
url: http://module-build.sourceforge.net/META-spec-v1.4.html
|
|
39 | 38 |
bugtracker: https://github.com/dod38fr/config-model-backend-yaml/issues
|
40 | 39 |
homepage: https://github.com/dod38fr/config-model/wiki
|
41 | 40 |
repository: git://github.com/dod38fr/config-model-backend-yaml.git
|
42 | |
version: '2.133'
|
43 | |
x_generated_by_perl: v5.28.1
|
|
41 |
version: '2.134'
|
|
42 |
x_generated_by_perl: v5.32.0
|
44 | 43 |
x_serialization_backend: 'YAML::Tiny version 1.73'
|
|
44 |
x_spdx_expression: LGPL-2.1
|
7 | 7 |
# The GNU Lesser General Public License, Version 2.1, February 1999
|
8 | 8 |
#
|
9 | 9 |
package Config::Model::Backend::Yaml;
|
10 | |
$Config::Model::Backend::Yaml::VERSION = '2.133';
|
|
10 |
$Config::Model::Backend::Yaml::VERSION = '2.134';
|
11 | 11 |
use 5.10.1;
|
12 | 12 |
use Carp;
|
13 | 13 |
use strict;
|
|
117 | 117 |
|
118 | 118 |
=head1 VERSION
|
119 | 119 |
|
120 | |
version 2.133
|
|
120 |
version 2.134
|
121 | 121 |
|
122 | 122 |
=head1 SYNOPSIS
|
123 | 123 |
|
|
282 | 282 |
|
283 | 283 |
The GNU Lesser General Public License, Version 2.1, February 1999
|
284 | 284 |
|
285 | |
=for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan
|
|
285 |
=for :stopwords cpan testmatrix url bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan
|
286 | 286 |
|
287 | 287 |
=head1 SUPPORT
|
288 | 288 |
|
|
292 | 292 |
in addition to those websites please use your favorite search engine to discover more resources.
|
293 | 293 |
|
294 | 294 |
=over 4
|
295 | |
|
296 | |
=item *
|
297 | |
|
298 | |
Search CPAN
|
299 | |
|
300 | |
The default CPAN search engine, useful to view POD in HTML format.
|
301 | |
|
302 | |
L<http://search.cpan.org/dist/Config-Model-Backend-Yaml>
|
303 | |
|
304 | |
=item *
|
305 | |
|
306 | |
AnnoCPAN
|
307 | |
|
308 | |
The AnnoCPAN is a website that allows community annotations of Perl module documentation.
|
309 | |
|
310 | |
L<http://annocpan.org/dist/Config-Model-Backend-Yaml>
|
311 | |
|
312 | |
=item *
|
313 | |
|
314 | |
CPAN Ratings
|
315 | |
|
316 | |
The CPAN Ratings is a website that allows community ratings and reviews of Perl modules.
|
317 | |
|
318 | |
L<http://cpanratings.perl.org/d/Config-Model-Backend-Yaml>
|
319 | 295 |
|
320 | 296 |
=item *
|
321 | 297 |
|
|
0 |
#
|
|
1 |
# This file is part of Config-Model-Backend-Yaml
|
|
2 |
#
|
|
3 |
# This software is Copyright (c) 2018 by Dominique Dumont.
|
|
4 |
#
|
|
5 |
# This is free software, licensed under:
|
|
6 |
#
|
|
7 |
# The GNU Lesser General Public License, Version 2.1, February 1999
|
|
8 |
#
|
|
9 |
package SneakyObject;
|
|
10 |
|
|
11 |
use strict;
|
|
12 |
use warnings;
|
|
13 |
use Test::More;
|
|
14 |
use 5.10.1;
|
|
15 |
|
|
16 |
# class used with some fill.copyright.blanks.yml to check that object
|
|
17 |
# cannot be created from YAML files
|
|
18 |
|
|
19 |
sub DESTROY {
|
|
20 |
fail "SneakyObject was loaded from YAML data\n";
|
|
21 |
}
|
|
22 |
|
|
23 |
1;
|
|
24 |
|
6 | 6 |
#
|
7 | 7 |
# The GNU Lesser General Public License, Version 2.1, February 1999
|
8 | 8 |
#
|
9 | |
use Config::Model::BackendMgr;
|
|
9 |
use strict;
|
|
10 |
use warnings;
|
10 | 11 |
use utf8;
|
11 | 12 |
|
12 | |
$conf_dir = '/etc';
|
13 | |
$conf_file_name = 'test.yaml';
|
14 | |
|
15 | |
$model->create_config_class(
|
|
13 |
my @config_classes = ({
|
16 | 14 |
name => 'Master',
|
17 | 15 |
|
18 | 16 |
rw_config => {
|
|
28 | 26 |
null_value => { qw/type leaf value_type uniline/},
|
29 | 27 |
utf8_string => { qw/type leaf value_type uniline/},
|
30 | 28 |
]
|
31 | |
);
|
|
29 |
});
|
32 | 30 |
|
33 | |
$model_to_test = "Master";
|
34 | |
|
35 | |
@tests = (
|
|
31 |
my @tests = (
|
36 | 32 |
{
|
37 | 33 |
name => 'basic',
|
38 | 34 |
check => [
|
|
58 | 54 |
}
|
59 | 55 |
);
|
60 | 56 |
|
61 | |
1;
|
|
57 |
return {
|
|
58 |
model_to_test => "Master",
|
|
59 |
conf_dir => '/etc',
|
|
60 |
conf_file_name => 'test.yaml',
|
|
61 |
config_classes => \@config_classes,
|
|
62 |
tests => \@tests
|
|
63 |
};
|
|
64 |
|
1 | 1 |
localhost:
|
2 | 2 |
ipaddr: 127.0.0.1
|
3 | 3 |
alias: localhost
|
4 | |
bilbo:
|
|
4 |
bilbo: !!perl/hash:SneakyObject
|
5 | 5 |
ipaddr: 192.168.0.1
|
6 | 6 |
yada:
|
|
7 |
|
|
8 |
# Local Variables:
|
|
9 |
# mode: yaml
|
|
10 |
# End:
|
6 | 6 |
#
|
7 | 7 |
# The GNU Lesser General Public License, Version 2.1, February 1999
|
8 | 8 |
#
|
9 | |
use Config::Model::BackendMgr;
|
|
9 |
use strict;
|
|
10 |
use warnings;
|
10 | 11 |
|
11 | |
$conf_dir = '/etc';
|
12 | |
$conf_file_name = 'hosts.yaml';
|
13 | |
|
14 | |
$model->create_config_class(
|
|
12 |
my @config_classes = ({
|
15 | 13 |
name => 'Host',
|
16 | 14 |
|
17 | 15 |
element => [
|
|
21 | 19 |
},
|
22 | 20 |
dummy => {qw/type leaf value_type uniline/},
|
23 | 21 |
]
|
24 | |
);
|
25 | |
$model->create_config_class(
|
|
22 |
});
|
|
23 |
|
|
24 |
push @config_classes, {
|
26 | 25 |
name => 'Hosts',
|
27 | 26 |
|
28 | 27 |
rw_config => {
|
|
42 | 41 |
},
|
43 | 42 |
},
|
44 | 43 |
]
|
45 | |
);
|
|
44 |
};
|
46 | 45 |
|
47 | |
$model_to_test = "Hosts";
|
48 | |
|
49 | |
@tests = (
|
|
46 |
my @tests = (
|
50 | 47 |
{
|
51 | 48 |
name => 'basic',
|
52 | 49 |
check => [
|
|
56 | 53 |
},
|
57 | 54 |
);
|
58 | 55 |
|
59 | |
1;
|
|
56 |
return {
|
|
57 |
model_to_test => "Hosts",
|
|
58 |
conf_dir => '/etc',
|
|
59 |
conf_file_name => 'hosts.yaml',
|
|
60 |
config_classes => \@config_classes,
|
|
61 |
tests => \@tests
|
|
62 |
};
|
|
63 |
|
0 | 0 |
# -*- cperl -*-
|
1 | 1 |
use warnings;
|
2 | |
|
3 | 2 |
use strict;
|
4 | 3 |
|
5 | |
use Config::Model::Tester 3.006;
|
6 | |
use ExtUtils::testlib;
|
|
4 |
use Config::Model::Tester 4.001;
|
|
5 |
|
|
6 |
use lib 't/lib';
|
|
7 |
use SneakyObject;
|
7 | 8 |
|
8 | 9 |
$::_use_log4perl_to_warn = 1;
|
9 | 10 |
|
5 | 5 |
[Support]
|
6 | 6 |
perldoc = 0
|
7 | 7 |
bugs = metadata
|
8 | |
websites = search,anno,ratings,kwalitee,testers,testmatrix,deps
|
|
8 |
websites = search,ratings,kwalitee,testers,testmatrix,deps
|