check out https://metacpan.org/module/DBIx::Inline
I haven't actually used it, but it looks like a good lead in to my
preferred ORM, https://metacpan.org/module/DBIx::Class
if you can't see how you'd use that you might need to post the code you are
using to process the templates to make it easier
++ certainly. I just thought I'd give a little prod in the right
direction.. 8)
On Mon, Jan 16, 2012 at 9:06 AM, Bill Moseley wrote:
>
>
> On Mon, Jan 16, 2012 at 1:58 AM, wrote:
>
>>
>> Passing variblles into [% ... %] is a on going problem for me.
>>
>> a keyone is
>>
>> [% pagecode = data.pa
[% query = 'SELECT * FROM page_tb WHERE (status = 2 AND page_code = "
_ data.page_name + '" AND sitename = "' _ data.sitename _" ) ORDER BY
sitename' %]
[% FOREACH link = DBI.query( query ) %]
[% site = link.sitename%]
[% PageName = link.view_name %]
hmm.. it appears you could get a compiled template with
$compiled = $tt->context->template('template.tt);
but I'd have to ask why you would want/need to do this?
cheers,
J
On Thu, Jan 12, 2012 at 7:18 AM, E R wrote:
> Is there way to compile a template without rendering it?
>
> Ideally I'd
'=>' then your
function should get the list it is expecting I think.
cheers,
J
--
Jason Galea
Web Developer
Ph 07 40556926
Mob 04 12345 534
www.eightdegrees.com.au
___
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates
use PROCESS instead of INCLUDE to do this I think..
Andrew Black wrote:
> As I understand it, when you call include it localises all variables, so
> changes made inside the included file are discarded.
> In general this is desirable
>
> I have a requirement for one or more templates (???) to hav
Hi Andy,
When trying to parse a broken template more than once you get a parse error
the first time and then a "not found" on subsequent attempts. Is this
intentional? I can't really see it being a problem in normal use but I did
just spend way too many hours trying to figure out how I'd broke
Hi Ashley,
you can do this via your template config.
my $template = Template->new({
INCLUDE_PATH => [ '/home/usr/html',
'/usr/local/html' ],
});
Put the users' directory first, followed by the default directory. TT
will search the directories in order givi
But TT's process method takes a file name as argument, not a
string. Do I have to understand how to subclass
Template::Provider, Template::Document, and Template::Parser if I
want to get this to work?
the process method takes a file name, string ref, or GLOB..
http://search.cpan.org/~abw/Template-
Hi David,
well that's a new one by me.. I wouldn't have expected the first one to
work, but it looks like sort is returning the keys of the hash..
I think this should work for you..
[% FOREACH n = school_details %]
[% n.key %][% n.value %]
[% END %]
and by the looks of things, that will s
10 matches
Mail list logo