[Templates] Extending Template::Provider
Jess Robinson
castaway@desert-island.demon.co.uk
Wed, 1 Nov 2006 13:45:48 +0000 (GMT)
On Wed, 1 Nov 2006, Dominic Malolepszy wrote:
> Cool, its pretty much how I ended up doing it. Im stuck at one point though.
> Id like to be able to allow the INTERPOLATE ability in database templates as
> well. Your DBI provider doesnt appear to have this either.
>
> Anyone have any ideas how to provide an INTERPOLATE ability to a Provider?
I have no idea INTERPOLATE is/does, enlighten me?
Jess
>
> Jess Robinson wrote:
>>
>>
>>
>> On Sat, 14 Oct 2006, Dominic Malolepszy wrote:
>>
>> > Ended up figuring this out. I just had to pass a INCLUDE_PATH to the
>> > default provider I was creating. Anyway, now that I'm using my own
>> > instantiated providers, when the files do not exist no errors are thrown
>> > to the screen that it cannot find the files. Is theres something that I
>> > need to pass to enable it. Because if you do not create your own
>> > Provider object and let Template create its own, than if you try to load
>> > non-existant templates than the appropriate error is displayed. However
>> > when you try to manually load Template::Provider this does not happen,
>> > strange. I might be missing something :(
>> >
>> > Anyway I got it so that templates are loaded from a database and it
>> > appears to work :). At the moment the module I have is pretty primitive,
>> > but I will share it here if anyone is interested, its not overly
>> > complicated.
>> >
>>
>> Gah, I need to get my Template::Provider::DBI checked in, Andy, where are
>> those svn commit bits??
>>
>> I've already made one of these, which was waiting for 2.15 to go out, and
>> now it's umm.. waiting for me to stop being lazy..
>>
>> You need to pass your ->new() the entire config.
>>
>> http://desert-island.dynodns.net:8888/perldists/Template-Provider-DBI-0.01.tar.gz
>>
>>
>> Jess
>>
>>
>> _______________________________________________
>> templates mailing list
>> templates@template-toolkit.org
>> http://lists.template-toolkit.org/mailman/listinfo/templates
>>
>> -------------------------------Safe
>> Stamp-----------------------------------
>> Your Anti-virus Service scanned this email. It is safe from known viruses.
>> For more information regarding this service, please contact your service
>> provider.
>
>
>