stop using excludes within moose, since it's no longer necessary
[gitmo/Moose.git] / lib / Moose / Meta / Method / Accessor / Native / Array / join.pm
CommitLineData
910684ee 1package Moose::Meta::Method::Accessor::Native::Array::join;
2
3use strict;
4use warnings;
5
88e88a7b 6use Moose::Util ();
7
8b9641b8 8use Moose::Role;
9
00bbc132 10with 'Moose::Meta::Method::Accessor::Native::Reader';
910684ee 11
a7821be5 12sub _minimum_arguments { 1 }
13
14sub _maximum_arguments { 1 }
910684ee 15
16sub _inline_check_arguments {
e3181911 17 my $self = shift;
18
53a4677c 19 return (
20 'if (!Moose::Util::_STRINGLIKE0($_[0])) {',
21 $self->_inline_throw_error(
22 '"The argument passed to join must be a string"',
23 ) . ';',
24 '}',
25 );
910684ee 26}
27
28sub _return_value {
53a4677c 29 my $self = shift;
30 my ($slot_access) = @_;
910684ee 31
53a4677c 32 return 'join $_[0], @{ (' . $slot_access . ') }';
910684ee 33}
34
8b9641b8 35no Moose::Role;
36
910684ee 371;