Codebase list libconfig-model-backend-yaml-perl / cc32070
Update upstream source from tag 'upstream/2.134' Update to upstream version '2.134' with Debian dir e3d2df61de6350e4a09ea6f16cbdc45eb8df43a0 gregor herrmann 3 years ago
12 changed file(s) with 87 addition(s) and 68 deletion(s). Raw diff Collapse all Expand all
2424 dist_author => 'Dominique Dumont (ddumont at cpan dot org)',
2525
2626 'build_requires' => {
27 'Config::Model::BackendMgr' => '0',
28 'Config::Model::Tester' => '3.006',
27 'Config::Model::Tester' => '4.001',
2928 'Config::Model::Tester::Setup' => '0',
3029 'ExtUtils::testlib' => '0',
3130 '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
06 2.133 2018-12-29
17
28 * 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.
11 Build.PL
22 CONTRIBUTING.md
33 Changes
1111 lib/Config/Model/Backend/Yaml.pm
1212 t/README.md
1313 t/backend_yaml.t
14 t/lib/SneakyObject.pm
1415 t/lib/test_yaml_model.pl
1516 t/model_tests.d/backend-yaml-data-examples/basic
1617 t/model_tests.d/backend-yaml-data-examples/utf8_data
33 "Dominique Dumont"
44 ],
55 "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",
77 "license" : [
88 "lgpl_2_1"
99 ],
4242 },
4343 "test" : {
4444 "requires" : {
45 "Config::Model::BackendMgr" : "0",
46 "Config::Model::Tester" : "3.006",
45 "Config::Model::Tester" : "4.001",
4746 "Config::Model::Tester::Setup" : "0",
4847 "ExtUtils::testlib" : "0",
4948 "Path::Tiny" : "0",
6766 "web" : "http://github.com/dod38fr/config-model-backend-yaml"
6867 }
6968 },
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"
7373 }
7474
22 author:
33 - 'Dominique Dumont'
44 build_requires:
5 Config::Model::BackendMgr: '0'
6 Config::Model::Tester: '3.006'
5 Config::Model::Tester: '4.001'
76 Config::Model::Tester::Setup: '0'
87 ExtUtils::testlib: '0'
98 Module::Build: '0.34'
1514 configure_requires:
1615 Module::Build: '0.34'
1716 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'
1918 license: lgpl
2019 meta-spec:
2120 url: http://module-build.sourceforge.net/META-spec-v1.4.html
3938 bugtracker: https://github.com/dod38fr/config-model-backend-yaml/issues
4039 homepage: https://github.com/dod38fr/config-model/wiki
4140 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
4443 x_serialization_backend: 'YAML::Tiny version 1.73'
44 x_spdx_expression: LGPL-2.1
77 # The GNU Lesser General Public License, Version 2.1, February 1999
88 #
99 package Config::Model::Backend::Yaml;
10 $Config::Model::Backend::Yaml::VERSION = '2.133';
10 $Config::Model::Backend::Yaml::VERSION = '2.134';
1111 use 5.10.1;
1212 use Carp;
1313 use strict;
117117
118118 =head1 VERSION
119119
120 version 2.133
120 version 2.134
121121
122122 =head1 SYNOPSIS
123123
282282
283283 The GNU Lesser General Public License, Version 2.1, February 1999
284284
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
286286
287287 =head1 SUPPORT
288288
292292 in addition to those websites please use your favorite search engine to discover more resources.
293293
294294 =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>
319295
320296 =item *
321297
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
66 #
77 # The GNU Lesser General Public License, Version 2.1, February 1999
88 #
9 use Config::Model::BackendMgr;
9 use strict;
10 use warnings;
1011 use utf8;
1112
12 $conf_dir = '/etc';
13 $conf_file_name = 'test.yaml';
14
15 $model->create_config_class(
13 my @config_classes = ({
1614 name => 'Master',
1715
1816 rw_config => {
2826 null_value => { qw/type leaf value_type uniline/},
2927 utf8_string => { qw/type leaf value_type uniline/},
3028 ]
31 );
29 });
3230
33 $model_to_test = "Master";
34
35 @tests = (
31 my @tests = (
3632 {
3733 name => 'basic',
3834 check => [
5854 }
5955 );
6056
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
11 localhost:
22 ipaddr: 127.0.0.1
33 alias: localhost
4 bilbo:
4 bilbo: !!perl/hash:SneakyObject
55 ipaddr: 192.168.0.1
66 yada:
7
8 # Local Variables:
9 # mode: yaml
10 # End:
66 #
77 # The GNU Lesser General Public License, Version 2.1, February 1999
88 #
9 use Config::Model::BackendMgr;
9 use strict;
10 use warnings;
1011
11 $conf_dir = '/etc';
12 $conf_file_name = 'hosts.yaml';
13
14 $model->create_config_class(
12 my @config_classes = ({
1513 name => 'Host',
1614
1715 element => [
2119 },
2220 dummy => {qw/type leaf value_type uniline/},
2321 ]
24 );
25 $model->create_config_class(
22 });
23
24 push @config_classes, {
2625 name => 'Hosts',
2726
2827 rw_config => {
4241 },
4342 },
4443 ]
45 );
44 };
4645
47 $model_to_test = "Hosts";
48
49 @tests = (
46 my @tests = (
5047 {
5148 name => 'basic',
5249 check => [
5653 },
5754 );
5855
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
00 # -*- cperl -*-
11 use warnings;
2
32 use strict;
43
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;
78
89 $::_use_log4perl_to_warn = 1;
910
55 [Support]
66 perldoc = 0
77 bugs = metadata
8 websites = search,anno,ratings,kwalitee,testers,testmatrix,deps
8 websites = search,ratings,kwalitee,testers,testmatrix,deps