in reply to Finding the dirpath of a template (Template::Toolkit)

You might want to consider hacking into the source code of Template::Toolkit and adding a function that will give you the location of the file it is processing. Don't know if that will work, and I would strongly recommend backing up the source code first.

Never be afraid to add functionality to existing code.

  • Comment on Re: Finding the dirpath of a template (Template::Toolkit)

Replies are listed 'Best First'.
•Re: Re: Finding the dirpath of a template (Template::Toolkit)
by merlyn (Sage) on Jan 23, 2004 at 13:30 UTC
    "hack the source"? Surely you jest. Template Toolkit is so incredibly hook-able and extensible. It even has toolkit in the name! At worst, you'd need to subclass the Template::Document class and provide an extra document variable. At worst.

    -- Randal L. Schwartz, Perl hacker
    Be sure to read my standard disclaimer if this is a reply.