Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: Using DateTime together with Template::Toolkit

by mdillon (Priest)
on Mar 01, 2005 at 06:59 UTC ( #435296=note: print w/replies, xml ) Need Help??

in reply to Using DateTime together with Template::Toolkit

If you were using the XS Stash, I don't think this would be a problem.

If you really have a reason to use the non-XS stash, you can patch TT. The fix is to change the code that creates the $atroot variable in the _dotop method. It is described in this post to the TT mailing list. There is similar code in _assign that could probably stand to be patched as well.

Note: The change in question adds a dependency on the Scalar::Util module, which should work on whatever version of Perl you can run TT on.

  • Comment on Re: Using DateTime together with Template::Toolkit

Replies are listed 'Best First'.
Re^2: Using DateTime together with Template::Toolkit
by Corion (Patriarch) on Mar 01, 2005 at 07:27 UTC

    I don't know resp. didn't check if the XS Stash is active or not, but it sure sounds like if it isn't. The patch you mentioned sounds promising - I will try that!

    Of course, there shouldn't be a difference between the XS version and the Pure Perl version of Template::Stash.

      I agree that they should work the same, but in this case, there is a discrepency.

      I only suggested using the XS Stash instead since it seems to work correctly. Also, that message was posted to the TT mailing list a few months ago (in response to a message from the maintainer, so he's obviously aware of it) and there hasn't been a release containing the fix yet. That makes me think that waiting for the pure Perl Stash to work may take a while.

      Why not? They do different things ...

      Being right, does not endow the right to be rude; politeness costs nothing.
      Being unknowing, is not the same as being stupid.
      Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
      Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://435296]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2022-12-09 00:16 GMT
Find Nodes?
    Voting Booth?

    No recent polls found