Add POD for Macro::quote
This commit is contained in:
parent
0b5d4e4614
commit
05b899db69
1 changed files with 10 additions and 0 deletions
|
|
@ -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 {
|
sub quote {
|
||||||
my $text = shift;
|
my $text = shift;
|
||||||
$text =~ s/([\\'])/\\$1/g;
|
$text =~ s/([\\'])/\\$1/g;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue