Having this:
use utf8;
package ÁngryBird; #note the Á in the package name
perl -c
result is syntax OK
.
use utf8;
package ÁngryMoose;
use Moose;
perl -c
says,
ÁngryMoose is not a module name at
/opt/local/lib/perl5/site_perl/5.12.4/darwin-multi-2level/Class/MOP/Package.pm
line 209.
So, what's wrong in the code?
Moose
uses this regexp from Package::Stash::PP
for checking package name:
elsif ($package !~ /\A[0-9A-Z_a-z]+(?:::[0-9A-Z_a-z]+)*\z/) {
confess "$package is not a module name";
}
or this regexp from Package::Stash::XS
:
const char *vmre = "\\A[0-9A-Z_a-z]+(?:::[0-9A-Z_a-z]+)*\\z";
But you may create your own package stash inplementation in namespace Package::Stash
, and use it by setting environment variable PACKAGE_STASH_IMPLEMENTATION
or variable $Package::Stash::IMPLEMENTATION
before loading Package::Stash
. For example, if your implementation have name Package::Stash::My
then set variable to My
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With