blib/lib/YAML/PP/Schema/Merge.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 12 | 12 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 4 | 4 | 100.0 |
pod | 1 | 1 | 100.0 |
total | 17 | 17 | 100.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | 1 | 1 | 601 | use strict; | |||
1 | 2 | ||||||
1 | 29 | ||||||
2 | 1 | 1 | 6 | use warnings; | |||
1 | 2 | ||||||
1 | 49 | ||||||
3 | package YAML::PP::Schema::Merge; | ||||||
4 | |||||||
5 | our $VERSION = '0.036'; # VERSION | ||||||
6 | |||||||
7 | 1 | 1 | 402 | use YAML::PP::Type::MergeKey; | |||
1 | 2 | ||||||
1 | 84 | ||||||
8 | |||||||
9 | sub register { | ||||||
10 | 1 | 1 | 1 | 4 | my ($self, %args) = @_; | ||
11 | 1 | 2 | my $schema = $args{schema}; | ||||
12 | |||||||
13 | 1 | 3 | $schema->add_resolver( | ||||
14 | tag => 'tag:yaml.org,2002:merge', | ||||||
15 | match => [ equals => '<<' => YAML::PP::Type::MergeKey->new ], | ||||||
16 | ); | ||||||
17 | } | ||||||
18 | |||||||
19 | 1; | ||||||
20 | |||||||
21 | __END__ |