hi,
I made this FILTER for accessing "sprintf" from TT :
$$self{FILTERS} ||= {
sprintf => [ \&Page::Utils::sprintfTT, 1 ]
};
sub sprintfTT {
my ($context, @args) = @_;
return sub { sprintf $args[0], shift }
};
my question do I really need to make it dynamic.. I don't use the $context
and I even don't want to use Text inside the tags (i more like to use it
like VARIABLE VIRTUAL method )... I'm using it like this :
<?
IF field == 'Field' ;
row.$field FILTER sprintf('%.4f') ;
ELSE ; row.$field ;
END
?>
I wondering why this doesn't work :
<? field == 'Field' ? row.$field FILTER sprintf('%.4f') : row.$field ?>
OR the best way should be :
<? field == 'Field' ? row.$field.sprintf('%.4f') : row.$field ?>
OR :
<? field == 'Field' ? sprintf('%.4f', row.$field) : row.$field ?>
:"))
Thanx alot in advance
=====
iVAN
[EMAIL PROTECTED]
=====