| 1 | package FLAT::Transition::Simple; | ||||||||||
| 2 | |||||||||||
| 3 | 6 | ▶ | use parent 'FLAT::Transition'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | 6 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 6 | ▶ | use Carp; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | sub new { | ||||||||||
| 9 | 8716 | ▶ | my ($pkg, @things) = @_; | ||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 10 | 8716 | bless {map {$_ => 1} @things}, $pkg; | |||||||||
| 11 | } | ||||||||||
| 12 | |||||||||||
| 13 | sub does { | ||||||||||
| 14 | 476727 | ▶ | my ($self, @things) = @_; | ||||||||
|
Subroutine
does: called CC=2 SCAR=7.1
Pod
undocumented
| |||||||||||
| 15 | 476727 | ▶ | return 1 if @things == 0; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 16 | 476727 | return !!grep $self->{$_}, @things; | |||||||||
| 17 | } | ||||||||||
| 18 | |||||||||||
| 19 | sub add { | ||||||||||
| 20 | 12569 | ▶ | my ($self, @things) = @_; | ||||||||
|
Subroutine
add: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 21 | 12569 | @$self{@things} = (1) x @things; | |||||||||
| 22 | } | ||||||||||
| 23 | |||||||||||
| 24 | sub delete { | ||||||||||
| 25 | 0 | ▶ | my ($self, @things) = @_; | ||||||||
|
Subroutine
delete: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 26 | 0 | delete $self->{$_} for @things; | |||||||||
| 27 | } | ||||||||||
| 28 | |||||||||||
| 29 | sub alphabet { | ||||||||||
| 30 | 20477 | ▶ | my $self = shift; | ||||||||
|
Subroutine
alphabet: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 31 | 20477 | sort {$a cmp $b} keys %$self; | |||||||||
| 32 | } | ||||||||||
| 33 | |||||||||||
| 34 | sub as_string { | ||||||||||
| 35 | 1126 | ▶ | my $self = shift; | ||||||||
|
Subroutine
as_string: called CC=2 SCAR=7.1
Pod
undocumented
| |||||||||||
| 36 | 1126 | ▶ | join ",", map {length $_ ? $_ : "epsilon"} $self->alphabet; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 37 | } | ||||||||||
| 38 | |||||||||||
| 39 | 6 | 1; | |||||||||