| 1 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | package YAML::PP::Schema::Tie::IxHash; | ||||||||||
| 4 | |||||||||||
| 5 | 1 | our $VERSION = 'v0.43.0'; # VERSION | |||||||||
| 6 | |||||||||||
| 7 | 1 | ▶ | use base 'YAML::PP::Schema'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 1 | ▶ | use Scalar::Util qw/ blessed reftype /; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 1 | my $ixhash = eval { require Tie::IxHash }; | |||||||||
| 11 | |||||||||||
| 12 | 0 | ▶ | sub register { | ||||||||
|
Subroutine
register: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 13 | 0 | my ($self, %args) = @_; | |||||||||
| 14 | 0 | my $schema = $args{schema}; | |||||||||
| 15 | 0 | ▶ | unless ($ixhash) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 16 | 0 | die "You need to install Tie::IxHash in order to use this module"; | |||||||||
| 17 | } | ||||||||||
| 18 | |||||||||||
| 19 | $schema->add_representer( | ||||||||||
| 20 | tied_equals => 'Tie::IxHash', | ||||||||||
| 21 | 0 | ▶ | code => sub { | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 22 | 0 | my ($rep, $node) = @_; | |||||||||
| 23 | 0 | $node->{items} = [ %{ $node->{data} } ]; | |||||||||
| 24 | 0 | return 1; | |||||||||
| 25 | }, | ||||||||||
| 26 | 0 | ); | |||||||||
| 27 | 0 | return; | |||||||||
| 28 | } | ||||||||||
| 29 | |||||||||||
| 30 | 1 | 1; | |||||||||
| 31 | |||||||||||
| 32 | __END__ | ||||||||||