1 package Moose::Meta::Method::Accessor::Native::String::match;
7 $VERSION = eval $VERSION;
8 our $AUTHORITY = 'cpan:STEVAN';
10 use base 'Moose::Meta::Method::Accessor::Native::Reader';
12 sub _minimum_arguments { 1 }
13 sub _maximum_arguments { 1 }
15 sub _inline_check_arguments {
18 return $self->_inline_throw_error(
19 q{'The argument passed to match must be a string or regexp reference'}
20 ) . q{ unless ! ref $_[0] || ref $_[0] eq 'Regexp';};
24 my ( $self, $slot_access ) = @_;
26 return "$slot_access =~ \$_[0]";