[Templates] dynamic content-type in Apache::Template

[prev] [thread] [next] [Date index for 2005/03/02]

From: Todd W
Subject: [Templates] dynamic content-type in Apache::Template
Date: 22:10 on 02 Mar 2005
I need to determine the content-type of the response per request.

With this patch to Template::Service::Apache, it lets me do what I want in
my Template::Service::Apache subclass by defining a content_type subroutine:

159c159
<     $r->content_type($self->{ CONTENT_TYPE })
---
>     $r->content_type($self->content_type)
169a170
> sub content_type { $self->{ CONTENT_TYPE } }

I didnt actually do this, currently I override the whole headers() sub.

I also thought about setting $self->{ CONTENT_TYPE } every request in my
subclass.

Can I get this applied, or is there a better way to do it?

Todd W.




_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

[Templates] dynamic content-type in Apache::Template
Todd W 22:10 on 02 Mar 2005

Generated at 14:49 on 03 Mar 2005 by mariachi v0.52