Skip Menu |

This queue is for tickets about the curry CPAN distribution.

Report information
The Basics
Id: 104401
Status: open
Priority: 0/
Queue: curry

People
Owner: ether [...] cpan.org
Requestors: MAXS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: (no value)
Fixed in: (no value)



Subject: More than 60% speedup in most cases...
Hello, In curry::AUTOLOAD and curry::weak::AUTOLOAD, the "address" of $method can be pre-computed once. my ($method_name) = our $AUTOLOAD =~ /^curry::(.+)$/; my $method = $invocant->can($method_name) || $method_name; Regards, Max.
One minor point: if an object is reblessed between the ->curry::method and actual call, caching the method may cause surprising behaviour. (might be *acceptable* behaviour if it's well-documented, I don't have a strong opinion either way) cheers, Tom
Due to the potential for reblessing, an AUTOLOAD doing weird things, or a can doing weird things, I don't think this should be changed. I think it should always just call using the method name given.