Subject: | all methods not listed |
Date: | Fri, 11 Jan 2013 17:15:42 -0600 |
To: | bugs-data-printer [...] rt.cpan.org |
From: | Caleb Cushing <xenoterracide [...] gmail.com> |
here's the dump of collection list, it's not showing methods like
contains and next, but I can call them
Ticket::Posts {
Parents Collection::List
public methods (12) : add, add_all, clear, DESTROY, first, get,
iterator, meta, new, set, size, to_array
private methods (0)
internals: {
_ [
[0] Gator::Ticket::Post
]
}
}
use Moose;
extends 'Class';
with 'Role::Collection';
sub contains {
my ( $self, $obj ) = @_;
my $res = $self->first( sub { $_->equals( $obj ) } ) ? 1 : 0;
return $res;
}
sub next {
my $self = shift;
state $iter = $self->iterator;
my $next = $iter->();
return $next;
}
has _ => (
isa => 'ArrayRef[Object]',
traits => ['Array'],
is => 'bare',
clearer => 'clear',
handles => {
get => 'get',
set => 'set',
size => 'count',
add => 'push',
add_all => 'push',
iterator => [ natatime => 1 ],
first => 'first',
to_array => 'elements',
},
);
__PACKAGE__->meta->make_immutable;
1;
--
Caleb Cushing
http://xenoterracide.com