;m afraid that this isn't possible.
--
Michael Peters
Plus Three, LP
--
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
secu
the __counter__ loop context var
combined with HTML::Template::Expr.
...
> Nothing in the docs suggests a way to do this (or am I missing something?).
It's not possible with just HTML::Template, but HTML::T
don't have to ever do it again
until something changes and we then have to restart.
I could see releasing either your filter approach, or the approach by
Krang as separate modules onto CPAN, but not general enough for H::T
rl get a little ugly but prevents the
> speed hit.
Maybe a new "lexical_vars" option that will fall back to a parent-loop
or top-level declared var if one doesn't exist in the current loop? That
would be similar to the way vars work in Perl loops. Is that what
me small bugs from RT and do
some code organization changes (Dist::Zilla, perltidy, etc). I'll post
an announcement when that happens.
--
Michael Peters
Plus Three, LP
--
Xperia(TM) PLAY
It's a major bre
ough, I could
see the use in a tag.
Thanks for the feedback.
--
Michael Peters
Plus Three, LP
--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable netw
objects:
+ Add a tag. Could be useful for template driven behaviors
(combined with param() or query()) or when combined with
:
Any questions? Comments? Verbal Abuse? Any offers of help?
Thanks,
--
Michael Peters
Plus Three, LP
---
S
But it doesn't have full query support.
--
Michael Peters
Plus Three, LP
--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http
On 11/24/2009 09:24 PM, Brad Baxter wrote:
> Is there a better way?
I've done this by using a different name for each pass. So something like:
So you run it through HTML::Template once to get the output and then
s/http://p.sf.net/sfu/bobj-july
___
e a patched version of
> H::T for my purposes with a method like param_escape() or sth like that,
> right?
No, please don't do that. Don't run with a patched version unless
absolutely necessary. Instead go with a subcla
at's the
max claimed by H::T::P) then you've taken a full 0.096 sec off.
That little gain is just not worth it to me if you have to jump through hoops
to make other things
with with the module (like you're trying to do with H::T::Sec). Plus it doesn't
support query()
which
use the same underlying
template. Then you can
use the same process that you're using to fill in one to fill in the other.
--
Michael Peters
Plus Three, LP
--
___
Html-tem
have your object persist or be
"stored" (clever name huh)
somewhere then Storable is what you want. If you just want to clone the object,
then use the Clone
module.
--
Michael Peters
Plus Three, LP
--
SF.Net
on the 2nd pass.
Just FYI, I've heard this technique named a couple of different things,
in case you want to impress anyone :) It's usually called "2 pass
templating" or "Write-thru cache templating".
--
Michael Peters
Plus Three, LP
--
x27;t have mixed strings like you do, or we've moved on to UTF8 :)
--
Michael Peters
Plus Three, LP
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/M
the perl coder and pass that to the template, which seems a lot
> of pointless effort
If you're so concerned about doing it in your Perl code, then I'd do it with
Javascript. Create extra image elements depending on the rating value.
--
Mic
regardless of tmpl_if or not. die_on_bad_params prevents the
Perl code from passing in vars that don't exist in the template, not the
template from having unused vars.
--
Michael Peters
Developer
Plus Three, LP
-
Take
> Is there a way to create a filter in HT that does the same thing?
# This is a comment
--
Michael Peters
Developer
Plus Three, LP
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techs
then insert the time into that scalar.
--
Michael Peters
Developer
Plus Three, LP
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
pUp does this is
by creating a popup HTML, parsing the final HTML and inserting it right before
the tag.
--
Michael Peters
Developer
Plus Three, LP
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.ne
ng for the existence of
variables in loops if the same loop is used more than once. Setting
die_on_bad_params to false will let you get around this problem, but that causes
problems if you wanted strict templates in the first place.
Fixing this has been one of my TODOs for a while... Stupid $wor
erted contexts
> (ie: TMPL_UNLESS + TMPL_ELSE). In particular, it works well when
> used with TMPL_ELSIF.
Again, I'm ambivalent.
> - Allow recursive H::T invocations for those cases where people
> _realy_ want to do >... [ and thus deal with
> the consequences of such an
Alex Kapranoff wrote:
> ESCAPE="0" works for now.
Well, there you go, I didn't even know you could do that.
Shlomi, I think using default_escape and escpe=0 for the exceptions is a much
cleaner way to go.
--
Michael Peters
Develo
There's `default_escape' option in recent HTML::Template. Is it not
> enough?
I think if you use default_escape => 'HTML' that would get him most of the way.
But there should be a way to turn off escaping when you know the var will
contain HTML. So ma
Not as easy to write. You can't just write one test that tests all your
templates. Plus you need to make sure you exercise every case so that every
template is used.
I prefer #2.
--
Michael Peters
Developer
Plus Three, LP
---
mplate.
In the code where you generate the data for the loop, create another template
object, pass in the same variables, get it's output and then use that output as
a var in your parent template.
--
Michael Peters
Developer
Plus Three, LP
Using Tomcat but need to do more? Need to suppor
Michael Peters wrote:
>
> Sam Tregar wrote:
>> On Fri, 14 Apr 2006, Michael Peters wrote:
>>
>>> So by making the "parser smart enough" do you mean copying that huge
>>> regex from H::T and modifying it with the expr regex?
>> Yeah, or u
Sam Tregar wrote:
> On Fri, 14 Apr 2006, Michael Peters wrote:
>
>> So by making the "parser smart enough" do you mean copying that huge
>> regex from H::T and modifying it with the expr regex?
>
> Yeah, or using Parse::RecDescent. H::T::E already uses it
Sam Tregar wrote:
> On Thu, 13 Apr 2006, Michael Peters wrote:
>
>> Is it possible to combine the 'escape' attribute of H::T with
>> H::T::Expr?
>
> No, I don't think so. I don't think it would be too hard to add
> support for it though. HTML
Is it possible to combine the 'escape' attribute of H::T with
H::T::Expr? I'm guessing not since any combination I've tried fails. If
it's too hard to do, maybe a new function could be added so that you can
do somthing like
--
Michael Peters
g.Am I missing something obvious here, or is
> HTML::Template not a good idea for producing XHTML 1.0 compliant documents?
H::T won't change anything about your template that isn't a tag. So
something else is changing your . What other tools are you passing your
output through?
--
Mich
bals or package
level vars hanging around.
When H::T caches the template, it doesn't cache the output or the params you
pass in, it just caches the compiled state of the template.
--
Michael Peters
Developer
Plus Three, LP
---
This SF
the url to see what different states look like.
They could also use something like Firefox + Tamper Data to even make it easier.
Might be overkill but if you did it right it could be reuseable for different
projects.
--
Michael Peters
Developer
Plus Three, LP
mpt to set nonexistent
parameter".
Now, query() shows that the loop contains the variable, since at least one
version does have it. I've attached an example. Is this expected behavior?
--
Michael Peters
Developer
Plus Three, LP
test.pl
Description: Perl program
is what Brad and I meant (I think)
--
Michael Peters
Developer
Plus Three, LP
---
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on
e isn't really a difference in which one you use (unless you
are using other attributes besides name). Mainly just choices of
style and just making you editor happy.
--
Michael Peters
Developer
Plus Three, LP
---
SF.Net email is sponsor
alar.
Then load this scalar into the second, outer template.
HTH
--
Michael Peters
Developer
Plus Three, LP
---
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past
";
just like that before you print anything else. Or you could use CGI.pm
like this...
use CGI;
my $q = CGI->new();
print $q->header();
HTH
Michael Peters
Developer
Plus Three, LP
---
This SF.Net email is sponso
38 matches
Mail list logo