Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

2shortplanks (968)

2shortplanks
  (email not shown publicly)
http://2shortplanks.com/
AOL IM: trelane2sp (Add Buddy, Send Message)
Yahoo! ID: trelane2sp (Add User, Send Message)

Mark Fowler has never been the same since he was elected leader of the London Perl Mongers. The strain manifests itself mainly in releasing various [cpan.org] modules [cpan.org] to CPAN, giving talks [2shortplanks.com], and use of the Trelane nick on #london.pm for endless procrastination. Doctors are still seeking a cure.
Sunday August 15, 2004
06:04 AM

Incompatible Errors

[ #20413 ]
So, I've got the basic Template Toolkit and Axkit language handers working again. It's in svn if you want to take a look. Still no dealing with caching, still no advanced configuration options.

So I've hit the same problem I had last time. Template Toolkit and AxKit basically have incompatible error handling. They both use objects to do their error handling and they both are naive enough to assume that any object thrown is one of their own type. For example, AxKit:

sub prep_exception {
    my $err = shift;
    if (ref($err)) {
        return $err;
    }
    ...

Um...that's not good. if you return a Template::Exception object things are going to go very wrong (because there's no throw method for a start). Even worse is Template::Service:

    # there shouldn't ever be a non-exception object received at this
    # point... unless a module like CGI::Carp messes around with the
    # DIE handler.
    return undef
        unless (ref $$error);

...what you mean like AxKit does. Botheration.

I'm going to probably have to introduce some thunking, which probably means patching either AxKit or Template Toolkit, or probably both. Darn!

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.