That is more nice than my version of "var1,var2,var3" and a split inside the global.
Thank you very much.
Now i try the opposite way.
For example, assume a variable named ``person'' has been passed to the template parser with a value of:
{ name => "John Doe", age => 35, hair => "brown" }
The following example:
<%person.name%> is <%person.age%> and has <%person.hair%> hair.
Because of different reasons i have to pass all my text-fields to utf: (I know that i could change the setting inside lsql)
global utf_Title
my $tags = shift;
my $tmp= $tags->{Title};
utf8::encode($tmp);
return $tmp;
}
i would like to have:
global utf_all
my $tags = shift;
foreach $tags as $key=>$value {
utf8::encode($tags[$key]);
}
return @tags
}
Then in template i use <%tags.title%>
I will give it a try now.
Maybe it would be better to make the utf-translation directly in the script and just use the normal <%field%>?
Thank you very much.
Now i try the opposite way.
Code:
For example, assume a variable named ``person'' has been passed to the template parser with a value of:
{ name => "John Doe", age => 35, hair => "brown" }
The following example:
<%person.name%> is <%person.age%> and has <%person.hair%> hair.
Because of different reasons i have to pass all my text-fields to utf: (I know that i could change the setting inside lsql)
global utf_Title
Code:
sub { my $tags = shift;
my $tmp= $tags->{Title};
utf8::encode($tmp);
return $tmp;
}
i would like to have:
global utf_all
Code:
sub { my $tags = shift;
foreach $tags as $key=>$value {
utf8::encode($tags[$key]);
}
return @tags
}
Then in template i use <%tags.title%>
I will give it a try now.
Maybe it would be better to make the utf-translation directly in the script and just use the normal <%field%>?