Skip to content

Instantly share code, notes, and snippets.

Created December 23, 2017 10:15
Perl 6 variable as a key of a named argument
use v6;
use Test;
use My-Module;
my @opt = <opt1 opt2 opt3>;
for @opt -> $key {
lives-ok { my $n = My-Module.new( $key => 1 ) }, "option name $key ok";
}
done-testing();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment