| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | package KiokuDB::TypeMap::Default::JSON; | ||
| 4 | 7 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 7 | ▶ | use namespace::clean -except => 'meta'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 7 | extends qw(KiokuDB::TypeMap); | |
| 9 | |||
| 10 | 7 | with 'KiokuDB::TypeMap::Default::Canonical' => { | |
| 11 | excludes => [qw(reftype_entries)], | ||
| 12 | }; | ||
| 13 | |||
| 14 | 7 | has json_boolean_typemap => ( | |
| 15 | traits => [qw(KiokuDB::TypeMap)], | ||
| 16 | does => "KiokuDB::Role::TypeMap", | ||
| 17 | is => "ro", | ||
| 18 | lazy_build => 1, | ||
| 19 | ); | ||
| 20 | |||
| 21 | sub reftype_entries { | ||
| 22 | 17 | ▶ | my $self = shift; |
|
Subroutine
reftype_entries: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 23 | |||
| 24 | return ( | ||
| 25 | 17 | $self->KiokuDB::TypeMap::Default::Canonical::reftype_entries, | |
| 26 | SCALAR => "KiokuDB::TypeMap::Entry::JSON::Scalar", | ||
| 27 | REF => "KiokuDB::TypeMap::Entry::JSON::Scalar", | ||
| 28 | ); | ||
| 29 | } | ||
| 30 | |||
| 31 | sub _build_json_boolean_typemap { | ||
| 32 | 17 | ▶ | my $self = shift; |
|
Subroutine
_build_json_boolean_typemap: called CC=1 SCAR=0.0
| |||
| 33 | |||
| 34 | 17 | $self->_create_typemap( | |
| 35 | isa_entries => { | ||
| 36 | 'JSON::Boolean' => { | ||
| 37 | type => "KiokuDB::TypeMap::Entry::Passthrough", | ||
| 38 | intrinsic => 1, | ||
| 39 | }, | ||
| 40 | }, | ||
| 41 | ); | ||
| 42 | } | ||
| 43 | |||
| 44 | 7 | __PACKAGE__->meta->make_immutable; | |
| 45 | |||
| 46 | 7 | __PACKAGE__ | |
| 47 | |||
| 48 | __END__ | ||