This new patch will differentiate between static method and code ref ones. It also has a
commented out part where a cache of anonysubs for static methods can be stored, but I
think that's a bad thing to do - the reasons are also in the comments.
Best of luck
1308,1310c1308,1319
< return 1
< if ref($o->{'METHODS'} || 0) # sanity
< && exists $o->{'METHODS'}{$m};
---
> if (ref ($o->{'METHODS'} || 0) && exists $o->{'METHODS'}{$m}){
> if (ref $o->{'METHODS'} eq 'CODE'){
> return $o->{'METHODS'}{$m};
> } else {
> # $o->{'STATIC_METHOD_CODEREFS'}{$m} ||= sub { $Class::Classless::X::AUTOLOAD = $m; goto &Class::Classless::X::AUTOLOAD };
> # return $o->{'STATIC_METHOD_CODEREFS'}{$m};
> # the above is good for when you need to compare code refs, but that doesn't happen a lot.
> # the cons is an uglier namespace, deletion and redefinition of methods will break
> # and it's excessive. I prefer a simple:
> return sub { $Class::Classless::X::AUTOLOAD = $m; goto &Class::Classless::X::AUTOLOAD }
> }
> }
1313c1322
< return 0;
---
> return undef;