You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-dev@httpd.apache.org by Randy Kobes <ra...@theoryx5.uwinnipeg.ca> on 2004/01/10 23:32:37 UTC

rerunning original_command

Hi,
   With the current Apache-Test cvs, after the initial
dialogue asking which Apache binary you want is completed,
the original command is rerun with the desired configuration
options. However, this original command is reproduced as
't/TEST ....', and on Win32 't/TEST' isn't recognized as a
command. This diff
===========================================================
Index: lib/Apache/TestRun.pm
===================================================================
RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm,v
retrieving revision 1.136
diff -u -r1.136 TestRun.pm
--- lib/Apache/TestRun.pm	10 Jan 2004 22:07:17 -0000	1.136
+++ lib/Apache/TestRun.pm	10 Jan 2004 22:26:57 -0000
@@ -630,7 +630,7 @@

     # reconstruct argv, preserve multiwords args, eg 'PerlTrace all'
     my $argv = join " ", map { /^-/ ? $_ : qq['$_'] } @ARGV;
-    $original_command = "$0 $argv";
+    $original_command = "$^X $0 $argv";
     $orig_cwd = Cwd::cwd();
     $self->set_ulimit;
     $self->set_env; #make sure these are always set
=============================================================
prepends the Perl binary to this command, which can then
be run.

I'm wondering, though - might there be circumstances where
$original_command contains the Perl binary already?

-- 
best regards,
randy

Re: rerunning original_command

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Sat, 10 Jan 2004, Stas Bekman wrote:

> Randy Kobes wrote:
> > Hi,
> >    With the current Apache-Test cvs, after the initial
> > dialogue asking which Apache binary you want is completed,
> > the original command is rerun with the desired configuration
> > options. However, this original command is reproduced as
> > 't/TEST ....', and on Win32 't/TEST' isn't recognized as a
> > command. This diff
> > ===========================================================
> > Index: lib/Apache/TestRun.pm
> > ===================================================================
> > RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm,v
> > retrieving revision 1.136
> > diff -u -r1.136 TestRun.pm
> > --- lib/Apache/TestRun.pm	10 Jan 2004 22:07:17 -0000	1.136
> > +++ lib/Apache/TestRun.pm	10 Jan 2004 22:26:57 -0000
> > @@ -630,7 +630,7 @@
> >
> >      # reconstruct argv, preserve multiwords args, eg 'PerlTrace all'
> >      my $argv = join " ", map { /^-/ ? $_ : qq['$_'] } @ARGV;
> > -    $original_command = "$0 $argv";
> > +    $original_command = "$^X $0 $argv";
> >      $orig_cwd = Cwd::cwd();
> >      $self->set_ulimit;
> >      $self->set_env; #make sure these are always set
> > =============================================================
> > prepends the Perl binary to this command, which can then
> > be run.
> >
> > I'm wondering, though - might there be circumstances where
> > $original_command contains the Perl binary already?
> >
>
> I think it's pretty safe:
>
> % perl -le 'print $0'
> -e
>
> 'perl' is not in $0. Is it different on windows?

No, it's the same - I just wanted to be sure that the
Perl binary didn't creep in from somewhere else. Thanks.

-- 
best regards,
randy

Re: rerunning original_command

Posted by Stas Bekman <st...@stason.org>.
Randy Kobes wrote:
> Hi,
>    With the current Apache-Test cvs, after the initial
> dialogue asking which Apache binary you want is completed,
> the original command is rerun with the desired configuration
> options. However, this original command is reproduced as
> 't/TEST ....', and on Win32 't/TEST' isn't recognized as a
> command. This diff
> ===========================================================
> Index: lib/Apache/TestRun.pm
> ===================================================================
> RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm,v
> retrieving revision 1.136
> diff -u -r1.136 TestRun.pm
> --- lib/Apache/TestRun.pm	10 Jan 2004 22:07:17 -0000	1.136
> +++ lib/Apache/TestRun.pm	10 Jan 2004 22:26:57 -0000
> @@ -630,7 +630,7 @@
> 
>      # reconstruct argv, preserve multiwords args, eg 'PerlTrace all'
>      my $argv = join " ", map { /^-/ ? $_ : qq['$_'] } @ARGV;
> -    $original_command = "$0 $argv";
> +    $original_command = "$^X $0 $argv";
>      $orig_cwd = Cwd::cwd();
>      $self->set_ulimit;
>      $self->set_env; #make sure these are always set
> =============================================================
> prepends the Perl binary to this command, which can then
> be run.
> 
> I'm wondering, though - might there be circumstances where
> $original_command contains the Perl binary already?
> 

I think it's pretty safe:

% perl -le 'print $0'
-e

'perl' is not in $0. Is it different on windows?

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com