Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

40 lines (33 sloc) 1.095 kb
use v6;
use Test;
plan 10;
# L<S02/Names/Symbols in the current package>
eval_lives_ok 'our sub eval_born { 5 }', 'can define a sub in eval';
#?pugs todo
eval_dies_ok 'eval_born()', 'call to eval-born sub outside eval dies';
#?rakudo skip 'Null PMC access in invoke()'
#?pugs skip 'OUR NYI'
is OUR::eval_born(), 5, 'call to eval-born our sub via OUR works';
# RT #63882
#?pugs skip "Unexpected: 'A'"
my enum A <a b c>;
is +c, 2, 'c is 2 from enum';
eval_lives_ok 'our sub c { "sub c" }',
'can define my sub c in eval after c defined in enum';
is +c, 2, 'c is still 2 from enum';
#?rakudo skip 'OUR::subname() does not work'
is OUR::c(), 'sub c', 'sub c called with OUR:: works';
# RT #69460
our $rt69460 = 1;
eval_lives_ok 'class RT69460 { $GLOBAL::rt69460++ }',
'can compile a class that modifies our variable';
ok ~~ ::OUR::RT69460, 'can instantiate class that modifies our variable';
#?pugs todo
is $rt69460, 2, 'class can modify our variable';
# vim: ft=perl6
Jump to Line
Something went wrong with that request. Please try again.