While I believe the suggestion you have has merit, I don't think it belongs
in the CGI::Application core. I think that what your proposing to closely
marrys the program logic to the display output, which is essentially what
CGI::Application attempts to circumvent.

If this is something that you want in your applications I would suggest
creating a function that takes your proposed HTML output and uses a module
like HTML::TokeParser to parse through it for any image / file paths and
replace them at that point. If you're using HTML-Template you should be able
to create a sub-class of it and override the output() function to accept
certain arguments and provide this type of solution.

> In my quest for maximum flexibility within my CGI::Applications, I've been
> considering the issue of images and resource paths in general.
>
> Interchange (another web development system I like) provides a system that
> allows for configurable image paths, which really helps when moving from
one
> server to another (or when you need to change where your images are
stored.)
> In Interchange it happens automagicly whenever you use an <img /> tag,
which
> is essentially the end goal for me, template designers shouldn't control
(or
> worry about) the location the images are loaded from.
>
> In my practice applications I'm playing with this type of construct
>
> <img src="/<TMPL_VAR NAME="IMAGE_PATH">/button.gif" border="0" />
>
> Currently, I substitute this 'IMAGE_PATH' by hand but I will move it to
one
> of those 'automatic' substitutions discussed in '[cgiapp] Enhancement
> request' [1].
>
> This seems like a good way to manage paths to resources ... anyone else
> agree?



---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to