[jifty-devel] Template::Declare Import Bug

David E. Wheeler david at kineticode.com
Thu Oct 8 20:16:04 EDT 2009

On Oct 8, 2009, at 12:35 PM, Jesse Vincent wrote:

> The specific usage I added this for, I _think_, was Jifty's CRUD
> templates when subclassed inside an application.  But yeah, we'll need
> to figure out a sane replacement for it.  Doccing it as deprecated  
> with
> the understanding that it needs to hang around until Jifty has moved  
> on
> is the right way forward.

There are three pieces of data:

   * The template name.
   * The class into which it was mixed
   * The path under which it was mixed

So you'd need something where you specified the name of the class you  
mixed into, as well as the path. I could see something like this

     package Wifty::UI;
     mix Wifty::Stuff under '/stuff';
     mix Wifty::Stuff under 'dupe';

     package Wifty::Other;
     mix Wifty::Stuff under 'here';

The data for this should be stored for Wifty::Stuff as:

     $mixed_into = {
         'Wifty::UI'   => [ '/stuff', 'dupe' ],
         'Wfity::Other => [ 'here' ]

Then you'd just need a method (or methods) to interrogate it. Would  
that work for your CRUD?



More information about the jifty-devel mailing list