Mercurial > pub > Impl
comparison Lib/IMPL/Resources/Format.pm @ 148:e6447ad85cb4
DOM objects now have a schema and schemaSource properties
RegExp now can launder data
Improved post to DOM transformation (multiple values a now supported)
Added new axes to navigation queries: ancestor and descendant
minor changes and bug fixes
author | wizard |
---|---|
date | Mon, 16 Aug 2010 08:26:44 +0400 |
parents | 196bf443b5e1 |
children | 4d0e1962161c |
comparison
equal
deleted
inserted
replaced
147:c2aa10fbb396 | 148:e6447ad85cb4 |
---|---|
7 our @EXPORT_OK = qw(&FormatMessage); | 7 our @EXPORT_OK = qw(&FormatMessage); |
8 | 8 |
9 sub FormatMessage { | 9 sub FormatMessage { |
10 my ($string,$args,$resolver) = @_; | 10 my ($string,$args,$resolver) = @_; |
11 | 11 |
12 $args ||= {}; | |
12 $resolver ||= \&_defaultResolver; | 13 $resolver ||= \&_defaultResolver; |
13 | 14 |
14 $string =~ s/%(\w+(?:\.\w+)*)%/_getvalue($args,$1,"\[$1\]",$resolver)/ge; | 15 $string =~ s/%(\w+(?:\.\w+)*)%/_getvalue($args,$1,"\[$1\]",$resolver)/ge; |
15 | 16 |
16 return $string; | 17 return $string; |