Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Dynamically altering static TT templates

by perrin (Chancellor)
on Apr 04, 2002 at 21:25 UTC ( #156775=note: print w/replies, xml ) Need Help??


in reply to Dynamically altering static TT templates

That would be a really nice debugging option, to have TT insert the name of each template in a comment when compiling it. Probably not hard, but I don't know where to add it without openeing up the code. I'd suggest it on the TT list and see if someone can quickly explain how to do it. I'm tempted to add it myself, but I know I won't be able to get to it soon.
  • Comment on Re: Dynamically altering static TT templates

Replies are listed 'Best First'.
(MeowChow) Re2: Dynamically altering static TT templates
by MeowChow (Vicar) on Apr 05, 2002 at 07:55 UTC
    More generally, it would be good to provide optional pre-processing and post-processing callback hooks.
       MeowChow                                   
                   s aamecha.s a..a\u$&owag.print
Re: Re: Dynamically altering static TT templates
by markmoon (Deacon) on Apr 05, 2002 at 20:27 UTC
    Would adding the following to each template file cover it?:
    open(TEMPLATE FILEHANDLE,$0); print "# ",$0;
    $0 contains the name of the file being read. I haven't played with TT (or templates) yet so this is just a hopeful guess.
    --
    @a = ("a".."z"," ","-","\n");
    @b = (12,0,17,10,24,12,14,14,13,26,8,18,26,0,26,
    22,0,13,13,0,27,1,4,26,15,4,17,11,26,7,0,2,10,4,17,28);
    print map {$a$_} @b;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2021-09-22 08:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?