NAME
MooseX::AttributeFilter::Trait::Attribute::Role - trait for filtered attributes in roles
SYNOPSIS
package My::Role;
use Moose::Role;
use MooseX::AttributeFilter;
has field => (
is => 'rw',
filter => 'filterField',
);
sub filterField {
my $this = shift;
return "filtered($_[0])";
}
package My::Class;
use Moose;
with 'My::Role';
package main;
My::Role->meta->get_attribute("field")->has_filter; # true
DESCRIPTION
This basically does nothing but is used when a role containing filtered attributes is composed into a class.
Methods
It has some things for introspection tho. c:
filter
-
Returns the value of the
filter
option. This may be a string (method name) or coderef or undef. has_filter
-
Boolean.
bypass_filter_method_check
-
Boolean.
SEE ALSO
LICENSE
Copyright (C) 2018 Little Princess Kitten <kitten@cpan.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
KITTEN <kitten@cpan.org>
https://metacpan.org/author/KITTEN
https://github.com/icklekitten
<3