| 1 | package JSV::Keyword::Draft4::Id; | ||
| 2 | |||
| 3 | 47 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 47 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 47 | ▶ | use parent qw(JSV::Keyword); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 47 | ▶ | use JSV::Keyword qw(:constants); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | sub instance_type() { INSTANCE_TYPE_ANY(); } | ||
| 10 | sub keyword() { 'id' } | ||
| 11 | sub keyword_priority() { 7; } | ||
| 12 | |||
| 13 | 121 | ▶ | sub validate { |
|
Subroutine
validate: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 14 | 121 | my ($class, $context, $schema, $instance) = @_; | |
| 15 | |||
| 16 | 121 | push @{ $context->{schema_pointer_history} }, $context->{current_schema_pointer}; | |
| 17 | 121 | $context->{current_schema_pointer} = $class->keyword_value($schema); | |
| 18 | |||
| 19 | 121 | ▶ | $context->register_cleanup_callback(sub { |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 20 | 121 | $context->{current_schema_pointer} = pop @{ $context->{schema_pointer_history} }; | |
| 21 | 121 | }); | |
| 22 | |||
| 23 | } | ||
| 24 | |||
| 25 | 47 | 1; | |