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