Subject: | Weird behaviour when using names matching /\d$/ |
--------------------------
package T0;
use Class::Trait 'base';
sub t1 { return "xxxx"; }
1;
my $o = bless {}, 'Whatever';
Class::Trait->apply ($o, 'T0');
warn $o->t1;
---------------------
gives
---------------------
Trait (T0) could not be found
---------------------
package T1;
use Class::Trait 'base';
sub t1 {
return "xxxx";
}
1;
my $o = bless {}, 'Whatever';
Class::Trait->apply ($o, 'T1');
warn $o->t1;
-----------------
gives
-----------------
111
-----------------
package T2;
use Class::Trait 'base';
sub t2 {
return "xxxx";
}
1;
my $o = bless {}, 'Whatever';
Class::Trait->apply ($o, 'T2');
warn $o->t2;
-----------------
22