[Bps-public-commit] Test-Script-Run branch, master, updated. 186de33648620dce6d5c624309188fd55eb8927e
sartak at bestpractical.com
sartak at bestpractical.com
Mon Nov 16 18:45:42 EST 2009
The branch, master has been updated
via 186de33648620dce6d5c624309188fd55eb8927e (commit)
via 656c178e8c019d842db51a530291d26449d6cfd5 (commit)
from 4aa5e58ef45c30fb5c951b96a2a83ddd4bc3143d (commit)
Summary of changes:
Changes | 4 ++++
lib/Test/Script/Run.pm | 15 +++++++++++----
2 files changed, 15 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit 656c178e8c019d842db51a530291d26449d6cfd5
Author: Shawn M Moore <sartak at gmail.com>
Date: Mon Nov 16 18:45:28 2009 -0500
Make get_perl_cmd public API
diff --git a/lib/Test/Script/Run.pm b/lib/Test/Script/Run.pm
index 8bdba43..0ff836b 100644
--- a/lib/Test/Script/Run.pm
+++ b/lib/Test/Script/Run.pm
@@ -46,7 +46,7 @@ sub run_script {
( $stdout, $stderr, $return_stdouterr ) =
( \$new_stdout, \$new_stderr, 1 );
}
- my @cmd = _get_perl_cmd($script);
+ my @cmd = get_perl_cmd($script);
my $ret = run3 [ @cmd, @$args ], undef, $stdout, $stderr;
$last_script_exit_code = $? >> 8;
@@ -120,10 +120,14 @@ sub _updir {
our $RUNCNT;
-# _get_perl_cmd( $script )
-# find the $script path
-sub _get_perl_cmd {
+=head2 get_perl_cmd($script, @ARGS)
+
+Returns a list suitable for passing to C<system>, C<exec>, etc.
+
+=cut
+
+sub get_perl_cmd {
my $script = shift;
my $base_dir;
unless ( File::Spec->file_name_is_absolute($script) ) {
@@ -148,6 +152,9 @@ sub _get_perl_cmd {
return @cmd;
}
+# back-compat
+*_get_perl_cmd = \&get_perl_cmd;
+
=head2 is_script_output($scriptname \@args, \@stdout_match, \@stderr_match, $msg)
Runs $scriptname, checking to see that its output matches.
commit 186de33648620dce6d5c624309188fd55eb8927e
Author: Shawn M Moore <sartak at gmail.com>
Date: Mon Nov 16 18:45:34 2009 -0500
Changes thus far
diff --git a/Changes b/Changes
index 834f702..6f2ca4f 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,9 @@
Revision history for Test-Script-Run
+0.03
+ Make get_perl_cmd public API
+ Strip references from @INC when generating a perl command
+
0.02 Tue Jun 2 18:26:50 CST 2009
add last_script_stdout, last_script_stderr and last_script_exit_code subs
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list