Beginning of dzilization
[gitmo/Moose.git] / lib / Moose / Meta / Method / Accessor / Native / String / append.pm
CommitLineData
e7724627 1package Moose::Meta::Method::Accessor::Native::String::append;
2
3use strict;
4use warnings;
5
e7724627 6our $AUTHORITY = 'cpan:STEVAN';
7
8b9641b8 8use Moose::Role;
9
10with 'Moose::Meta::Method::Accessor::Native::Writer' => {
11 -excludes => [
12 qw(
13 _minimum_arguments
14 _maximum_arguments
a486d5ad 15 _inline_optimized_set_new_value
8b9641b8 16 )
17 ]
7f5ec80d 18 };
e7724627 19
20sub _minimum_arguments { 1 }
8b9641b8 21
e7724627 22sub _maximum_arguments { 1 }
23
24sub _potential_value {
53a4677c 25 my $self = shift;
26 my ($slot_access) = @_;
e7724627 27
53a4677c 28 return '( ' . $slot_access . ' . $_[0] )';
e7724627 29}
30
a486d5ad 31sub _inline_optimized_set_new_value {
53a4677c 32 my $self = shift;
33 my ($inv, $new, $slot_access) = @_;
e32b7489 34
a486d5ad 35 return $slot_access . ' .= $_[0];';
e32b7489 36}
37
8b9641b8 38no Moose::Role;
39
e7724627 401;