my $two = 1;
$two = s/1/1+1/e;
print $two; # prints "2"
In your case, you need something like:
s{_TS_(.+_)}{$m->cache->get('_TS_'.$1.$lang)}eg
Brian
On 4/28/06, Christian Motschke <[EMAIL PROTECTED]
> wrote:
Hello,
I try to access the cache from a filter section. I theory it works, but I get a strange output:
MasonX::Request::WithApacheSession=HASH(0x8d50dfc)->cache->get('_TS_'.MENU_SPRACHE_.en)
What do I wrong?
My component looks like this:
_TS_MENU_SPRACHE_en
<%args>
$lang => 'en'
</%args>
<%init>
my $result = $m->cache->get('_TS_MENU_SPRACHE_en');
if (!defined($result)) {
$m->cache->set('_TS_MENU_SPRACHE_en','Language Page');
$m->cache->set('_TS_MENU_SPRACHE_de','Sprachseite');
}
</%init>
<%filter>
s{_TS_(.+_)}{$m->cache->get('_TS_'.$1.$lang)}g;
</%filter>
mit freundlichen Grüßen
Christian Motschke
--
IT Service Omikron GmbH
Mohrenstr. 63-64; D-10117 Berlin
Tel.: +49 (030) 220791-30
Fax: +49 (030) 220791-55
Email: [EMAIL PROTECTED]
Internet: www.itso.de
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users

