develooper Front page | perl.php.sandwich.dev | Postings from October 2005

Re: PHP Template Global Variables

Thread Previous | Thread Next
From:
David Wheeler
Date:
October 26, 2005 20:43
Subject:
Re: PHP Template Global Variables
Message ID:
F12B7F04-89BB-4B10-AA64-CBFAC34C35CA@kineticode.com
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

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About