Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@tene
Created May 11, 2009 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tene/109986 to your computer and use it in GitHub Desktop.
Save tene/109986 to your computer and use it in GitHub Desktop.
module Foo::EXPORT::DEFAULT { }; # work around a different rakudobug
module Foo {
our @a;
::Foo::EXPORT::DEFAULT<!sub_trait_broken> = sub ($trait, $block, $arg) {
@a.push({:block($block)});
};
}
use Foo;
sub lol is broken {
# Remove the 'return' to change it into an implied return, and it works.
return "hi";
}
say @Foo::a[0]<block>();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment