From 05b899db69910ffafdaabb65702a61ed1e1fab8e Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Thu, 26 Aug 2010 14:41:36 -0700 Subject: [PATCH] Add POD for Macro::quote --- lib/WebGUI/Macro.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/WebGUI/Macro.pm b/lib/WebGUI/Macro.pm index 77f2a21a5..26971ed71 100644 --- a/lib/WebGUI/Macro.pm +++ b/lib/WebGUI/Macro.pm @@ -257,6 +257,16 @@ sub _transformMacro { }); } +=head2 quote ($text) + +Escape backslashes and single quotes, and then return the text wrapped in single quotes. + +=head3 $text + +Text to quote. + +=cut + sub quote { my $text = shift; $text =~ s/([\\'])/\\$1/g;