projects
/
matthijs
/
upstream
/
blosxom-plugins.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add entries_cache_meta and recententries to MANIFEST.medium.
[matthijs/upstream/blosxom-plugins.git]
/
general
/
interpolate_conditional
diff --git
a/general/interpolate_conditional
b/general/interpolate_conditional
index 255bb18e2804e95a3410c1927c210dc3a55e17cd..264695bedfcb900980efcbed922062cc7e06737d 100644
(file)
--- a/
general/interpolate_conditional
+++ b/
general/interpolate_conditional
@@
-22,25
+22,25
@@
sub interpolate {
my $template = shift;
# defined
my $template = shift;
# defined
- $template =~ s#\?\{(\$\w+(?:::
)?\w
*) (.*?)\}#"defined $1 ? \$2 : ''"#gee;
+ $template =~ s#\?\{(\$\w+(?:::
\w+)
*) (.*?)\}#"defined $1 ? \$2 : ''"#gee;
# not defined
# not defined
- $template =~ s#\?\{!(\$\w+(?:::
)?\w
*) (.*?)\}#"!defined $1 ? \$2 : ''"#gee;
+ $template =~ s#\?\{!(\$\w+(?:::
\w+)
*) (.*?)\}#"!defined $1 ? \$2 : ''"#gee;
# not equal to
# not equal to
- $template =~ s#\?\{(\$\w+(?:::
)?\w
*)!=(.*?) (.*?)\}#"defined $1 and $1 ne '$2' ? \$3 : ''"#gee;
+ $template =~ s#\?\{(\$\w+(?:::
\w+)
*)!=(.*?) (.*?)\}#"defined $1 and $1 ne '$2' ? \$3 : ''"#gee;
# equal to
# equal to
- $template =~ s#\?\{(\$\w+(?:::
)?\w
*)=(.*?) (.*?)\}#"defined $1 and $1 eq '$2' ? \$3 : ''"#gee;
+ $template =~ s#\?\{(\$\w+(?:::
\w+)
*)=(.*?) (.*?)\}#"defined $1 and $1 eq '$2' ? \$3 : ''"#gee;
# greater than
# greater than
- $template =~ s#\?\{(\$\w+(?:::
)?\w
*)>(.*?) (.*?)\}#"defined $1 and $1 gt '$2' ? \$3 : ''"#gee;
+ $template =~ s#\?\{(\$\w+(?:::
\w+)
*)>(.*?) (.*?)\}#"defined $1 and $1 gt '$2' ? \$3 : ''"#gee;
# less than
# less than
- $template =~ s#\?\{(\$\w+(?:::
)?\w
*)<(.*?) (.*?)\}#"defined $1 and $1 lt '$2' ? \$3 : ''"#gee;
+ $template =~ s#\?\{(\$\w+(?:::
\w+)
*)<(.*?) (.*?)\}#"defined $1 and $1 lt '$2' ? \$3 : ''"#gee;
# unconditional (and recursive)
# unconditional (and recursive)
- while( $template =~ s/(\$[a-zA-Z]\w+(?:::
)?\w
*)/"defined $1 ? $1 : ''"/gee ) { }
+ while( $template =~ s/(\$[a-zA-Z]\w+(?:::
\w+)
*)/"defined $1 ? $1 : ''"/gee ) { }
return $template;
return $template;