All of the non-mutating array helpers are now inlined.
[gitmo/Moose.git] / lib / Moose / Meta / Method / Accessor / Native / Array / join.pm
1 package Moose::Meta::Method::Accessor::Native::Array::join;
2
3 use strict;
4 use warnings;
5
6 our $VERSION = '1.13';
7 $VERSION = eval $VERSION;
8 our $AUTHORITY = 'cpan:STEVAN';
9
10 use base 'Moose::Meta::Method::Accessor::Native::Array::Reader';
11
12 sub _inline_process_arguments {
13     return 'my $sep = shift;';
14 }
15
16 sub _inline_check_arguments {
17     return
18         q{die 'Must provide a string as an argument' unless defined $sep && ! ref $sep;};
19 }
20
21 sub _return_value {
22     my $self        = shift;
23     my $slot_access = shift;
24
25     return "join \$sep, \@{ $slot_access }";
26 }
27
28 1;