| 1 | package AI::Categorizer::ObjectSet; | ||||||||||
| 2 | 11 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | |||||||||||
| 4 | 132 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 5 | 132 | my $pkg = shift; | |||||||||
| 6 | 132 | my $self = bless {}, $pkg; | |||||||||
| 7 | 132 | ▶ | $self->insert(@_) if @_; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 8 | 132 | return $self; | |||||||||
| 9 | } | ||||||||||
| 10 | |||||||||||
| 11 | 198 | ▶ | sub members { | ||||||||
|
Subroutine
members: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 12 | 198 | return values %{$_[0]}; | |||||||||
| 13 | } | ||||||||||
| 14 | |||||||||||
| 15 | 9 | ▶ | sub size { | ||||||||
|
Subroutine
size: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 16 | 9 | return scalar keys %{$_[0]}; | |||||||||
| 17 | } | ||||||||||
| 18 | |||||||||||
| 19 | 187 | ▶ | sub insert { | ||||||||
|
Subroutine
insert: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 20 | 187 | my $self = shift; | |||||||||
| 21 | 187 | foreach my $element (@_) { | |||||||||
| 22 | #warn "types are ", @_; | ||||||||||
| 23 | 188 | $self->{ $element->name } = $element; | |||||||||
| 24 | } | ||||||||||
| 25 | } | ||||||||||
| 26 | |||||||||||
| 27 | 7 | ▶ | sub retrieve { $_[0]->{$_[1]} } | ||||||||
|
Subroutine
retrieve: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 28 | |||||||||||
| 29 | 16 | ▶ | sub includes { exists $_[0]->{ $_[1]->name } } | ||||||||
|
Subroutine
includes: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 30 | 0 | ▶ | sub includes_name { exists $_[0]->{ $_[1] } } | ||||||||
|
Subroutine
includes_name: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 31 | |||||||||||
| 32 | 11 | 1; | |||||||||