Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (14 sloc) 343 Bytes
use v6;
use Test;
plan 2;
# test splatted parameter for rw ability
# L<S06/"Subroutine traits"/"is rw">
my @test = 1..5;
lives_ok {
my sub should_work ( *@list is rw ) {
@list[0] = "hi";
}, "trying to use an 'is rw' splat does work out";
is(@test[0], "hi", "@test was changed");
# vim: ft=perl6
Something went wrong with that request. Please try again.