Permalink
Browse files

documented

  • Loading branch information...
1 parent 415f3de commit 805829a5e6b4c12dab500d8a790dd181bf4e2bfa Xavier Caron committed Mar 27, 2012
Showing with 9 additions and 1 deletion.
  1. +9 −1 lib/Devel/Cover/Test.pm
@@ -108,10 +108,18 @@ sub get_params
sub test { $Test }
+=head2 shell_quote
+
+ my $quoted_item = shell_quote($item)
+
+Returns properly quoted item to cope with embedded spaces.
+
+=cut
+
sub shell_quote
{
my ($item) = @_;
- # properly quote the item
+
$^O eq "MSWin32" ? (/ / and $_ = qq("$_")) : s/ /\\ /g for $item;
$item
};

0 comments on commit 805829a

Please sign in to comment.