Skip to content

Instantly share code, notes, and snippets.

@tadzik
Created March 3, 2012 10:43
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 tadzik/1965528 to your computer and use it in GitHub Desktop.
Save tadzik/1965528 to your computer and use it in GitHub Desktop.
enum exportation bug
┌─[tadzik@yavin4]─[~]
└─[%]─> cat MyModule.pm
module MyModule;
enum Foo is export (
bar => 7
);
say Foo::bar;
say bar;
┌─[tadzik@yavin4]─[~]
└─[%]─> cat user.pl
use MyModule;
say Foo::bar;
eval "say bar"
┌─[tadzik@yavin4]─[~]
└─[%]─> perl6 MyModule.pm
bar
bar
┌─[tadzik@yavin4]─[~]
└─[%]─> perl6 user.pl
bar
bar
bar
===SORRY!===
CHECK FAILED:
Undefined routine '&bar' called (line 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment