Permalink
Browse files

refactored and documented perl sub

  • Loading branch information...
1 parent 4781d6a commit b54cc9125bc20aedaffa57dc511b9667bc546be4 Xavier Caron committed Mar 27, 2012
Showing with 9 additions and 6 deletions.
  1. +9 −6 lib/Devel/Cover/Test.pm
View
@@ -115,16 +115,19 @@ sub shell_quote
$item
};
+=head2 perl
+
+ my $perl = $self->perl()
+
+Returns full path to Perl interpretor with proper -I options (blib-wise).
+
+=cut
+
sub perl
{
my $self = shift;
- my $perl = shell_quote $Devel::Cover::Inc::Perl;
- my $base = $Devel::Cover::Inc::Base;
-
- $perl .= " " . shell_quote "-I$base/$_" for "", "blib/lib", "blib/arch";
-
- $perl
+ join " ", map { shell_quote($_) } $Devel::Cover::Inc::Perl, map { "-I$Devel::Cover::Inc::Base/$_" } "", "blib/lib", "blib/arch";
}
sub test_command

0 comments on commit b54cc91

Please sign in to comment.