| 1 | package JSV::Keyword::Draft4::Id; | ||
| 2 | |||
| 3 | 45 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 45 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 45 | ▶ | use parent qw(JSV::Keyword); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 45 | ▶ | 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 | sub validate { | ||
| 14 | 8 | ▶ | my ($class, $context, $schema, $instance) = @_; |
|
Subroutine
validate: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 15 | |||
| 16 | 8 | push @{ $context->{schema_pointer_history} }, $context->{current_schema_pointer}; | |
| 17 | 8 | $context->{current_schema_pointer} = $class->keyword_value($schema); | |
| 18 | |||
| 19 | $context->register_cleanup_callback(sub { | ||
| 20 | 8 | ▶ | $context->{current_schema_pointer} = pop @{ $context->{schema_pointer_history} }; |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 21 | 8 | }); | |
| 22 | |||
| 23 | } | ||
| 24 | |||
| 25 | 45 | 1; | |