tagging: Allow using titles in for related stories.
[matthijs/upstream/blosxom-plugins.git] / general / interpolate_conditional
index 02130ba70b34130e1211696498fece6721c0994b..264695bedfcb900980efcbed922062cc7e06737d 100644 (file)
@@ -22,25 +22,25 @@ sub interpolate {
     my $template = shift;
 
     # defined
-       $template =~ s#\?\{(\$\w+(?:::)?\w*) (.*?)\}#"defined $1 ? \$2 : ''"#gee;
+       $template =~ s#\?\{(\$\w+(?:::\w+)*) (.*?)\}#"defined $1 ? \$2 : ''"#gee;
 
     # not defined
-       $template =~ s#\?\{!(\$\w+(?:::)?\w*) (.*?)\}#"!defined $1 ? \$2 : ''"#gee;
+       $template =~ s#\?\{!(\$\w+(?:::\w+)*) (.*?)\}#"!defined $1 ? \$2 : ''"#gee;
 
        # 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
-    $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
-       $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 
-       $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)
-       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;
 
@@ -118,20 +118,23 @@ Drop the interpolate_conditional plug-in into your Blosxom plugins folder.
 
 Rael Dornfest  <rael@oreilly.com>, http://www.raelity.org/
 
+This plugin is now maintained by the Blosxom Sourceforge Team,
+<blosxom-devel@lists.sourceforge.net>.
+
 =head1 ACKNOWLEDGEMENTS
 
 Eric David Sherman, for < and >
 
 =head1 SEE ALSO
 
-Blosxom Home/Docs/Licensing: http://www.raelity.org/apps/blosxom/
+Blosxom Home/Docs/Licensing: http://blosxom.sourceforge.net/
 
-Blosxom Plugin Docs: http://www.raelity.org/apps/blosxom/plugin.shtml
+Blosxom Plugin Docs: http://blosxom.sourceforge.net/documentation/users/plugins.html
 
 =head1 BUGS
 
-Address bug reports and comments to the Blosxom mailing list 
-[http://www.yahoogroups.com/group/blosxom].
+None known; please send bug reports and feedback to the Blosxom
+development mailing list <blosxom-devel@lists.sourceforge.net>.
 
 =head1 LICENSE