Changeset 5b75e8b for perlwrap.pm
- Timestamp:
- Aug 21, 2008, 6:20:16 PM (16 years ago)
- Branches:
- master, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 680ada9
- Parents:
- d5dcd7c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perlwrap.pm
r57cf4f9 r5b75e8b 300 300 %{$args}); 301 301 $func->($name, $args{default}, $args{summary}, $args{description}); 302 } 303 304 =head2 quote STRING 305 306 Return a version of STRING fully quoted to survive processing by 307 BarnOwl's command parser. 308 309 =cut 310 311 sub quote { 312 my $str = shift; 313 if ($str !~ /'/ && $str !~ /"/) { 314 return "$str"; 315 } 316 if ($str !~ /'/) { 317 return "'$str'"; 318 } 319 $str =~ s/"/"'"'"/g; 320 return '"' . $str . '"'; 302 321 } 303 322
Note: See TracChangeset
for help on using the changeset viewer.