My current Perl Ironman Challenge status is: My Ironman Badge

Monday, November 23, 2009

Of failed attempts

I had really high hopes for getting Template::Declare to play nicely with MooseX::Declare (or even vanilla Moose), but that is proving a little too difficult. TD does a lot of symbol table fuckery. My big problem is that the template declarator is caller aware. It takes the caller package, and stores it into the dispatch table and also munges the symbol table for the current package to store the code ref. The problem is that if you want to subclass something and apply a role that advises some methods, that advice will never be called because the invocant was set in stone at the time the declarator was called. And since everything in TD is essentially singleton, class based, that means the place where your advice lives, in the sub class, is never called.

Oh sure you could use something like MooseX::CompileTime::Traits to advise various things, but the problem is that is very very global and not at all appropriate for what I am trying to do. You couldn't have two different grid things because the advice would apply to /all/ of them.

Aside from that, it has been a significant, constant uphill battle trying to make things work and I have run out of time. So I'll be throwing together the current work project using plain old TT, but still use DBIC::API and the javascript goodness that I found.

Consider me really put out by this.

No comments:

Post a Comment