Skip Menu |

This queue is for tickets about the Params-Validate CPAN distribution.

Report information
The Basics
Id: 4821
Status: resolved
Priority: 0/
Queue: Params-Validate

People
Owner: DROLSKY [...] cpan.org
Requestors: DON [...] cpan.org
don [...] donarmstrong.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: 0.75



Subject: $self->can instead of UNIVERSAL::can($self) in Params::Validate
I've got what probably is a rather unusual request. It would be nice of Params::Validate checked $self->can instead of UNIVERSAL::can($self) when it is checking for a method of the object. I've got a new OO method that I'm playing with called Class::Modular which associates sub modules and their related methods with the object on a per object basis, rather than on a per-class basis. I provide a $self->can method which does what it is supposed to do or falls back to UNIVERSAL::can [which is what would happen if you called $self->can for a class that didn't have its own can method.] Looking at Validate.xs, I'm not totally sure how well that will work, but it's pretty easy (heh) in ValidatePP.pm...
[guest - Sat Jan 3 23:20:58 2004]: Show quoted text
> I've got what probably is a rather unusual request. > > It would be nice of Params::Validate checked $self->can instead of > UNIVERSAL::can($self) when it is checking for a method of the object. > I've got a new OO method that I'm playing with called Class::Modular > which associates sub modules and their related methods with the object > on a per object basis, rather than on a per-class basis. > > I provide a $self->can method which does what it is supposed to do or > falls back to UNIVERSAL::can [which is what would happen if you called > $self->can for a class that didn't have its own can method.] > > Looking at Validate.xs, I'm not totally sure how well that will work, > but it's pretty easy (heh) in ValidatePP.pm...
Well, I finally ended up needing this myself, so I implemented it. It's in version 0.75, which I just uploaded to CPAN.