The Perl and Raku Conference 2025: Greenville, South Carolina - June 27-29 Learn more
123456789101112131415 package Example::Schema::ResultSet::PersonRole;use strict;use warnings;use base 'Example::Schema::ResultSet';sub is_user { my $self = shift; # TODO: We need some logic or conventions around 'if we have a resultset cache # use that, otherwise make one. warn "user check"; return my $found = grep { $_->is_user } $self->all;}1;
package
Example::Schema::ResultSet::PersonRole;
use
strict;
warnings;
base
'Example::Schema::ResultSet'
;
sub
is_user {
my
$self
=
shift
# TODO: We need some logic or conventions around 'if we have a resultset cache
# use that, otherwise make one.
warn
"user check"
return
$found
grep
{
$_
->is_user }
->all;
}
1;