Re: PHP Template Global Variables

[email protected] (David Wheeler) Wed, 26 Oct 2005 20:43:30 -0700
Newsgroups perl.php.sandwich.dev
Message-ID <[email protected]>
On Oct 26, 2005, at 8:37 PM, George Schlossnagle wrote:

> Not so bad, really.  A more elegant solution might be more  
> aesthetic, but I don't think there'll be a noticeable performance  
> impact either way.

Just the overhead of the eval every time I instantiate a new burner,  
then, which means for every publish. But that was true before, too.

This reminds me: George, a while ago you and I discussed on IM the  
idea of adding a method to the $perl object to make it easier to call  
Perl class methods. Currently, we have to do this:

   $perl = Perl::getInstance();
   $perl->call(
       'Bric::Biz::Asset::Business::Story::list',
       'Bric::Biz::Asset::Business::Story',
        # args to list()
   );

This is annoying, of course, especially since it's wrong. The list()  
method is defined in Asset, and Story inherits it. So I'd actually  
have to do this:

   $perl = Perl::getInstance();
   $perl->call(
       'Bric::Biz::Asset::list',
       'Bric::Biz::Asset::Business::Story',
        # args to list()
   );

I have to know too much about the internals. Any chance you could add  
the methods we'd discussed before to make this more idiomatic?

Thanks,

David