Use dzil Authority plugin - remove $AUTHORITY from code
[gitmo/Moose.git] / lib / Moose / Meta / Method / Accessor / Native / Array / join.pm
index 26d488f..9010aaa 100644 (file)
@@ -5,10 +5,6 @@ use warnings;
 
 use Moose::Util ();
 
-our $VERSION = '1.14';
-$VERSION = eval $VERSION;
-our $AUTHORITY = 'cpan:STEVAN';
-
 use Moose::Role;
 
 with 'Moose::Meta::Method::Accessor::Native::Reader' => {
@@ -28,16 +24,20 @@ sub _maximum_arguments { 1 }
 sub _inline_check_arguments {
     my $self = shift;
 
-    return $self->_inline_throw_error(
-        q{'The argument passed to join must be a string'})
-        . ' unless Moose::Util::_STRINGLIKE( $_[0] );';
+    return (
+        'if (!Moose::Util::_STRINGLIKE0($_[0])) {',
+            $self->_inline_throw_error(
+                '"The argument passed to join must be a string"',
+            ) . ';',
+        '}',
+    );
 }
 
 sub _return_value {
-    my $self        = shift;
-    my $slot_access = shift;
+    my $self = shift;
+    my ($slot_access) = @_;
 
-    return "join \$_[0], \@{ $slot_access }";
+    return 'join $_[0], @{ (' . $slot_access . ') }';
 }
 
 no Moose::Role;