[off-topic] was: Re: [Templates] xml configuration and variables assignement ?

[prev] [thread] [next] [Date index for 2004/05/31]

From: Etienne Robillard
Subject: [off-topic] was: Re: [Templates] xml configuration and variables assignement ?
Date: 23:09 on 31 May 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Etienne Robillard wrote:
| Randal L. Schwartz wrote:
| |>>>>>"Etienne" == Etienne Robillard <erob@xxxxxxxxx.xx> writes:
| |
| |
| | Etienne> So right now, I used to call variables in list-context, as
| explained in
| | Etienne> Randal's article from perlmonks:
| | Etienne> http://www.perlmonks.org/index.pl?node_id=218480
| |
|
| | Oddly enough, 218480 contains my name, but wasn't written by me.
|
| Err opps, you're right, that article was from grantm ;)
|
| | Is there something else you were trying to reference?
| |
|
| Hm, the whole thing (imho) might be to coerce existing values from an
| xml source file throught the process() directive into the
| Template::Toolkit namespace.
|
| However, this might bring problems, such as when variables are
| interpolated or when in use under [% foo %] blocks :)
|
| Maybe something like:
|     my $vars = {
|         quork    =>    $some_variable
|     }
| ...
| could do the trick, assuming that `$some_variable' is an object for a
| class method such as XMLin() (XML::Simple).
|
|     erob


Hum, sleeping did clarify things quite a bit :)
So I guess the best thing to do is simply not to extend any modules such
as Template::Plugin::XML::Simple (which I have investigated for this
purpose - ditto for Template::Parser) nor it's a good idea to try
parsing stuff for input instead of using process() (as for output, in
the form of a Template::Document). Surely the latter option is the Right
Thing to do..

Thanks,
(I hoope it was good entertainment however ;)

erob







-----BEGIN PGP SIGNATURE-----

iD8DBQFAu7s3fhO/J4JSDfYRAg9hAKCxB75vIVPH0BFrxlMPqRCbfFJyHQCgq07j
YvhgT0uXsnlMGs8CJw+D2QA=
=N0/9
-----END PGP SIGNATURE-----

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

Re: [Templates] xml configuration and variables assignement ?
merlyn (Randal L. Schwartz) 01:39 on 30 May 2004

[off-topic] was: Re: [Templates] xml configuration and variables assignement ?
Etienne Robillard 23:09 on 31 May 2004

Generated at 08:56 on 15 Mar 2005 by mariachi v0.52