[jifty-devel] RFC: Login/Logout functionality

John Peacock jpeacock at rowman.com
Mon May 1 16:08:17 EDT 2006

Jesse Vincent wrote:
> This seems like something we should be adding to the classloader in a
> nice, generic way. IE, allow any plugin to use it to to the inheritance
> intermediation. Does that seem sane?

Yes.  Perhaps taking the existing classloader interface and splitting it 

1) a generic interface (callable by other code);
2) several instances of the generic (like the existing CRUD, 
CollectionClass, CurrentUserClass, etc).

Any code wishing to call Jifty::ClassLoader->Registration (or whatever 
it's called) would pass in a regex (to match on modulename) and a 
coderef (to be called iff the regex fires).  That way, the registration 
could happen in a BEGIN block but it would only execute if that method 
was required during runtime.

The existing Jifty::ClassLoader::INC could store an array of registered 
callbacks which would populate the @INC as needed (or a hash, but you 
can't use a regex as a hash key so we'd either have to require a string 
that could be used as a regex or some tricky array of array/hashes thing).


John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748

More information about the jifty-devel mailing list