| 1 | package JSON::TypeInference::Type::Union; | ||
| 2 | 3 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 3 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | 3 | ▶ | sub new { |
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 6 | 3 | my ($class, @types) = @_; | |
| 7 | 3 | return bless { _types => \@types }, $class; | |
| 8 | } | ||
| 9 | |||
| 10 | 0 | ▶ | sub name { |
|
Subroutine
name: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 11 | 0 | my ($class) = @_; | |
| 12 | 0 | return 'union'; | |
| 13 | } | ||
| 14 | |||
| 15 | 3 | ▶ | sub types { |
|
Subroutine
types: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 16 | 3 | my ($self) = @_; | |
| 17 | 3 | return $self->{_types}; | |
| 18 | } | ||
| 19 | |||
| 20 | 7 | ▶ | sub accepts { |
|
Subroutine
accepts: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 21 | 7 | my ($class, $data) = @_; | |
| 22 | 7 | return 0; | |
| 23 | } | ||
| 24 | |||
| 25 | 1 | ▶ | sub signature { |
|
Subroutine
signature: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 26 | 1 | my ($self) = @_; | |
| 27 | 1 | my @signatures = map { $_->signature } @{$self->types}; | |
| 28 | 1 | return join '|', sort @signatures; | |
| 29 | } | ||
| 30 | |||
| 31 | 3 | 1; | |
| 32 | __END__ | ||