You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package Foo { our sub x { say "X" } }
&Foo::y = sub { say "Y" };
our sub Foo::z { say "Z" }
## foo.p6
#!/usr/bin/env perl6
use lib $*PROGRAM.resolve.dirname;
use Foo;
Foo::Bar.new; # OK
say $Foo::var; # OK: 42
Foo::x; # OK: X
Foo::y; # OK: Y
Foo::z; ## X::AdHoc.new(payload => "Could not find symbol '\&z'")
There was some discussion on #perl6
<https://irclog.perlgeek.de/perl6/2016-12-09> about whether the compiler
should disallow such long names [psch++], or whether it should stuff it
in a package and vivify it for you [jnthn++].
IMHO, as a typical perl5 switcher, jnthn's solution seems the most
DWIM-ish --- and since the other alternatives offer just as much "spooky
action at a distance", it seems surprising that "our sub
Long::Package::name" wouldn't have the same effect.
Migrated from rt.perl.org#130378 (status was 'new')
Searchable as RT130378$
The text was updated successfully, but these errors were encountered: