Title: [opsview] [9660] Add another case to convert_perl_regexp_to_js_string().
Revision
9660
Author
pknight
Date
2012-07-30 17:23:21 +0100 (Mon, 30 Jul 2012)

Log Message

Add another case to convert_perl_regexp_to_js_string(). Perl 5.14.2 must output a different format.

Modified Paths

Modified: trunk/opsview-core/lib/Opsview/Utils.pm
===================================================================
--- trunk/opsview-core/lib/Opsview/Utils.pm	2012-07-30 16:09:01 UTC (rev 9659)
+++ trunk/opsview-core/lib/Opsview/Utils.pm	2012-07-30 16:23:21 UTC (rev 9660)
@@ -39,7 +39,7 @@
 
 =item Opsview::Utils->make_shell_friendly( $string )
 
-Will take $string and return back a single quoted version that can be run 
+Will take $string and return back a single quoted version that can be run
 in a shell
 
 =cut
@@ -199,7 +199,8 @@
 sub convert_perl_regexp_to_js_string {
     my ($re) = @_;
     my $string = "$re";
-    $string =~ s/\(\?\-xism\://;
+    $string =~ s/\Q(?-xism://;
+    $string =~ s/\Q(?^://;
     $string =~ s/\)$//;
     $string = "/" . $string . "/";
     $string;
@@ -477,7 +478,7 @@
 
 =item get_ssh_version
 
-Determine the version number of ssh being used.  Put here to allow 
+Determine the version number of ssh being used.  Put here to allow
 for adequate testing of version strings
 
 =cut

_______________________________________________
Opsview-checkins mailing list
[email protected]
http://lists.opsview.org/lists/listinfo/opsview-checkins

Reply via email to