X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FAutobox%2FArray.pm;h=de9a3cc4c7296590a92ee2f26a64c26ddf29bd52;hb=cc6691de77a8de4b8e8a8524d391b7b3ad5a9be4;hp=e43c8932ec49fa519489e3fde0d94fff98509ff3;hpb=8161f04439532a26a75c9be242971f6853a23b6a;p=gitmo%2FMoose-Autobox.git diff --git a/lib/Moose/Autobox/Array.pm b/lib/Moose/Autobox/Array.pm index e43c893..de9a3cc 100644 --- a/lib/Moose/Autobox/Array.pm +++ b/lib/Moose/Autobox/Array.pm @@ -85,6 +85,14 @@ sub sort { [ CORE::sort { $sub->($a, $b) } @$array ]; } +sub first { + $_[0]->[0]; +} + +sub last { + $_[0]->[$#{$_[0]}]; +} + ## ::Indexed implementation sub at { @@ -235,6 +243,10 @@ This is a role to describe operations on the Array type. =item B +=item B + +=item B + =back =head2 Indexed implementation