| 1 | package FormValidator::Simple::ArrayList; | ||
| 2 | 10 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 10 | ▶ | use base qw/Class::Accessor::Fast/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 10 | ▶ | use FormValidator::Simple::Iterator; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 10 | __PACKAGE__->mk_accessors(qw/records/); | |
| 7 | |||
| 8 | 14 | ▶ | sub new { |
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
documented
| |||
| 9 | 14 | my $class = shift; | |
| 10 | 14 | my $self = bless { }, $class; | |
| 11 | 14 | $self->records( [ ] ); | |
| 12 | 14 | $self->_init(@_); | |
| 13 | 14 | return $self; | |
| 14 | } | ||
| 15 | |||
| 16 | 0 | ▶ | sub _init { |
|
Subroutine
_init: not called CC=1 SCAR=6.9
| |||
| 17 | 0 | my ($self, @args) = @_; | |
| 18 | } | ||
| 19 | |||
| 20 | 16 | ▶ | sub append { |
|
Subroutine
append: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 21 | 16 | my ($self, $record) = @_; | |
| 22 | 16 | push @{ $self->records }, $record; | |
| 23 | } | ||
| 24 | |||
| 25 | 18 | ▶ | sub get_record_at { |
|
Subroutine
get_record_at: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 26 | 18 | my ($self, $index) = @_; | |
| 27 | 18 | return $self->records->[$index]; | |
| 28 | } | ||
| 29 | |||
| 30 | 18 | ▶ | sub records_count { |
|
Subroutine
records_count: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 31 | 18 | my $self = shift; | |
| 32 | 18 | return scalar @{ $self->records }; | |
| 33 | } | ||
| 34 | |||
| 35 | 0 | ▶ | sub iterator { |
|
Subroutine
iterator: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 36 | 0 | my $self = shift; | |
| 37 | 0 | return FormValidator::Simple::Iterator->new($self); | |
| 38 | } | ||
| 39 | |||
| 40 | 10 | 1; | |
| 41 | __END__ | ||