It seems like Mouse is not adding methods for attributes with unicode names though I can't find any limitations that would prevent it.
use strict;
use warnings;
use utf8;
package C1 {
use Mouse;
has 'pi', is => 'ro', isa => 'Num', default => 2 * atan2(1, 0);
no Mouse;
sub π { goto \&pi }
}
package C2 {
use Mouse;
has 'π', is => 'ro', isa => 'Num', default => 2 * atan2(1, 0);
no Mouse;
}
binmode STDERR, ':utf8';
eval {
my $c1 = C1->new();
print $c1->π, "\n";
};
warn $@ if $@;
eval {
my $c2 = C2->new();
print $c2->π, "\n";
};
warn $@ if $@;
is giving me the output:
3.14159265358979
Can't locate object method "π" via package "C2" at bug.pl line 29.
It seems like Mouse is not adding methods for attributes with unicode names though I can't find any limitations that would prevent it.
is giving me the output:
Is this something that should work?