Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (14 sloc) 0.552 kb
use Test::More qw(no_plan);
use strict;
use warnings;
use autobox::Core;
# https://github.com/schwern/perl5i/issues/182
my $scalar = 'foo';
my($reverse) = $scalar->reverse; # list context
is $reverse, 'oof', 'reverse in list context reverses the scalar';
is scalar $scalar->reverse, 'oof', 'reverse in scalar context reverses the scalar';
is "Hello"->reverse, "olleH";
my @list = qw(foo bar baz);
is_deeply [@list->reverse], [qw(baz bar foo)];
my $arrayref = @list->reverse;
is ref $arrayref, "ARRAY", "returns an arrayref in scalar context";
Jump to Line
Something went wrong with that request. Please try again.