hear hear!
I've got some _extremely_ ugly templates that are outputting CSV or tab
delimited data, as they loop through data cells in each row, and have
several conditions within each row and cell...
perhaps it would be reasonable to consider adding an option for
stripping white space out of line
I'm still at a loss why a simple filter function couldn't do this work.
Perhaps what we need is people to contribute filter functions to do these
kinds of things.
Brian
-Original Message-
From: Jody Biggs [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 11, 2003 3:19 PM
To: simran;
I'm coming from the TT world, where this is just an option to new(). I get
all kinds of useful options to make the results look prettier:
my %opts = (
TRIM => 1,
PRE_CHOMP => 1,
POST_CHOMP => 1,
);
$tt = Template->new(%opts);
From http://www.template-toolkit.org/docs/default/Manual/Config.
Well, if we had people providing these filter functions, it still would be a
simple config option:
It might look something like this:
my %opts = (
filter => [ HTML::Template::Filter::PreChomp,
HTML::Template::FilterPostChomp ]
)
$tt = Template->new( %opts );
Brian
-Original Message-
I have the need to package HT with a package distributions, as most purchaser's
don't know what a Perl Module is, much less have the ability to install from
CPAN. And of course, more and more Host Providers today are offering $1.95
plans with CGI functionality and ZERO skill to support it.
So
One other advantage of doing this as a filter function. Any updates to the
function can be done independently of Sam's release of H::T (provide that
it's in a separate package)
Brian
-Original Message-
From: Drew Taylor [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 11, 2003 4:08 PM
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi list,
sure, post filtering would be a good feature! Meanwhile I get by
with pre filtering in the following way:
$CLEANFILTER = sub {
return if $CFG->{no_filter} == 1;
my $text_ref = shift;
my $h = new HTML::Clean($text_ref, 9);
$h->strip({
Ok, I buy that. My final question is how does adding filters affect the
speed? It seems like adding a couple filters that work on 20-100kb of text
would start to bog down under high load. Of course, that's really a
non-issue since we'll never come close to approaching a "high" load but I
still
I always use the cache options, so I've never really cared about the speed
of how much the filter effects the rendering. However, this seems like it
would be a fairly simple regex, and if there is something that perl does
really fast, it's regexes. I would think that doing a regex on 100K of data
It appears that neither query() param() return the list of parameters
in the order that they appear in the template file. (Example below.)
How can I do this? Am I missing a special option or a feature?
Is this a desired feature that would be welcomed into HTML::Template?
Do @pstack and %pmap i
On Tue, 11 Feb 2003, Brandon Bowersox wrote:
> It appears that neither query() param() return the list of parameters
> in the order that they appear in the template file. (Example below.)
That's true.
> How can I do this? Am I missing a special option or a feature?
You can't. The parameter n
11 matches
Mail list logo