| 1 | package Dallycot::AST::XmlnsDef; | ||
| 2 | 29 | our $AUTHORITY = 'cpan:JSMITH'; | |
| 3 | |||
| 4 | # ABSTRACT: A no-op placeholder | ||
| 5 | |||
| 6 | 29 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 29 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 29 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | 29 | ▶ | use parent 'Dallycot::AST'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | 29 | ▶ | use Promises qw(deferred); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | |||
| 14 | ▶ | sub to_json { | |
|
Subroutine
to_json: not called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 15 | } | ||
| 16 | |||
| 17 | 0 | ▶ | sub to_string { return "" } |
|
Subroutine
to_string: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 18 | |||
| 19 | 0 | ▶ | sub is_declarative { return 1 } |
|
Subroutine
is_declarative: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 20 | |||
| 21 | ▶ | sub identifier { } | |
|
Subroutine
identifier: not called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 22 | |||
| 23 | sub as_text { | ||
| 24 | 0 | ▶ | my ($self) = @_; |
|
Subroutine
as_text: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 25 | |||
| 26 | 0 | my ( $prefix, $uri ) = @$self; | |
| 27 | |||
| 28 | 0 | return "ns:$prefix := <" . $uri->value . ">"; | |
| 29 | } | ||
| 30 | |||
| 31 | sub prefix { | ||
| 32 | 0 | ▶ | my ($self) = @_; |
|
Subroutine
prefix: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 33 | |||
| 34 | 0 | return $self->[0]; | |
| 35 | } | ||
| 36 | |||
| 37 | sub namespace { | ||
| 38 | 0 | ▶ | my ($self) = @_; |
|
Subroutine
namespace: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 39 | |||
| 40 | 0 | return $self->[1]->value; | |
| 41 | } | ||
| 42 | |||
| 43 | sub execute { | ||
| 44 | 0 | ▶ | my ( $self, $engine ) = @_; |
|
Subroutine
execute: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 45 | |||
| 46 | 0 | my $d = deferred; | |
| 47 | |||
| 48 | 0 | $engine->add_namespace( $self->[0], $self->[1]->value ); | |
| 49 | |||
| 50 | 0 | $d->resolve( $self->[1] ); | |
| 51 | |||
| 52 | 0 | return $d->promise; | |
| 53 | } | ||
| 54 | |||
| 55 | 29 | 1; | |