[jifty-devel] Re: [Jifty-commit] r1467 - in jifty/branches/plugin_rewrite: . lib/Jifty lib/Jifty/Plugin

John Peacock jpeacock at rowman.com
Tue Jul 4 08:34:40 EDT 2006

jifty-commit at lists.jifty.org wrote:
> Go back to previously working plugin model.  

I thought this needed a little more explanation on the list.  What is currently
located in jifty/branches/plugin_rewrite is my original internal implementation,
which I've confirmed works as a drop-in replacement for the comparable code in
Wifty.  Since I originally hacked the Login plugin out of Wifty in the first
place, it isn't too surprising that this works and looks the same.

> Still throws unnecessary errors for Models that the plugin has no intention
> of supporting (but that Jifty will).

The errors emitted *only during the initial application load* look like this:

> ERROR - Can't locate Jifty/Plugin/Login/Model/Page.pm in @INC (@INC contains: /home/jpeacock/devel/wifty/lib /usr/lib/perl5/5.8.7/i586-linux-thread-multi /usr/lib/perl5/5.8.7 /usr/lib/perl5/site_perl/5.8.7/i586-linux-thread-multi /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.7/i586-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl . Jifty::ClassLoader=HASH(0x8394a78) Jifty::Plugin::ClassLoader=HASH(0x99c87f4) Jifty::ClassLoader=HASH(0x99d7320)) at /usr/lib/perl5/site_perl/5.8.7/Jifty/ClassLoader.pm line 139

and are true in the sense that the Login plugin has no such model and false in
the sense that it doesn't matter, since Wifty::Model::Page will be supported by
the Jifty autogenerated classes.  Indeed, if I add the Nothing plugin to the mix
too, I now get twice as many false errors:

> ERROR - Can't locate Jifty/Plugin/Login/Model/Page.pm...
> ERROR - Can't locate Jifty/Plugin/Nothing/Model/Page.pm...

but the Wifty application itself still functions (no further errors emitted).

So, we are back to the same two ways to move forward:

1) merge all ClassLoader @INC instances into a single loop (i.e. only throw an
error if nothing matches);

2) make Jifty::Util->require smarter about when it needs to throw an error.

I'm going to go ahead and add the Login files to trunk/plugins to make it easier
for others to comment.  It's still not feature complete, but it has all the
functionality that Wifty had, so it is workable for now.


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

More information about the jifty-devel mailing list