logo       
Google Custom Search
    AddThis Social Bookmark Button

[FormBuilder] source file regexp broken; patch: msg#00032

Subject: [FormBuilder] source file regexp broken; patch
If you use quantifiers in a regexp in a source file, it splits 
on comma (thinking it's options?) and breaks the regexp.

Here's a fix.  --Mark

diff -u /tmp/File.pm  /usr/local/share/perl/5.8.8/CGI/FormBuilder/Source/File.pm
--- /tmp/File.pm        2006-10-30 13:32:00.000000000 -0800
+++ /usr/local/share/perl/5.8.8/CGI/FormBuilder/Source/File.pm  2006-10-30 
13:31:44.000000000 -0800
@@ -127,7 +127,10 @@
             }

             my @val;
-            if ($term =~ /^js/ || $term eq 'messages') {
+            if  (   $term =~ /^js/
+                ||  $term eq 'messages'
+                ||  $line =~ /^\/.*?\/$/
+                ) {
                 @val = $line;   # verbatim
             } elsif ($line =~ s/^\\(.)//) {
                 # reference - this is tricky

_______________________________________________
FBusers mailing list
FBusers@xxxxxxxxxxxxxxx
http://www.formbuilder.org/mailman/listinfo/fbusers




Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>