I am a bit stumped by the following behaviour while using TT and since I seem to be getting nowhere fast I thought I would run it past you lot.
I have a few warn statements in my object "_init" methods which are used to give an idea where things get to during debugging and I noticed the following.
New CMS CMS CMS->_init() New CMS::Manager New CMS::Manager::Session New CMS::Manager::Session::Pg New CMS::Manager::Page New CMS::Page Died at /var/www/csfp/objects/CMS/Page.pm line 121.
I have deliberately called "die" in the above output just before
124 $self->template()->process( $lib, $self->page_vars()) 125 or die $self->template()->error(), " Shit\n";
$self->template() returns a template object.
When I take out the "die" call I get the following output.
CMS CMS->_init() New CMS::Manager New CMS::Manager::Session New CMS::Manager::Session::Pg New CMS::Manager::Page New CMS::Page New CMS CMS CMS->_init() New CMS::Manager New CMS::Manager::Session New CMS::Manager::Session::Pg New CMS::Manager::Page New CMS::Page New CMS CMS CMS->_init() New CMS::Manager New CMS::Manager::Session New CMS::Manager::Session::Pg New CMS::Manager::Page New CMS::Page
I was wondering if anyone has seen this sort of thing before or have an explanation for this behaviour. I originally thought it was something to do with the perl interpreter not actaully creating the objects until it needs them ie some form of COW was going on but it still does not explain why I get 2 extra sets. I then thought that maybe TT clones the objects somehow but I doubt this is the reason either.
I am pretty sure I have done something silly but you never know hence my reason for asking.
H
_______________________________________________ templates mailing list [EMAIL PROTECTED] http://lists.template-toolkit.org/mailman/listinfo/templates
