use Test;
use MySub;
my UInt $counter;
my-sub executing-something {
# say &?ROUTINE; # errors
$counter++
}
my-sub returning-something {
"the returned value"
}
# cant parse signature
#my-sub say-answer($answer = 42) {
# say $answer
#}
executing-something;
is $counter, 1, "it does run the first time";
executing-something;
is $counter, 2, "it does not run the second time";
is returning-something, "the returned value", "it does not return the correct value";
done-testing
class MySub is Metamodel::ClassHOW {}
package EXPORTHOW {
package DECLARE {
constant my-sub = MySub
}
}