[25949] in Perl-Users-Digest
Perl-Users Digest, Issue: 8168 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jun 13 03:05:28 2005
Date: Mon, 13 Jun 2005 00:05:04 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 13 Jun 2005 Volume: 10 Number: 8168
Today's topics:
Re: ActiveState: Can't spawn "cmd.exe"? <maildump@isite.net.au>
Re: ActiveState: Can't spawn "cmd.exe"? <sisyphus1@nomail.afraid.org>
Re: ActiveState: Can't spawn "cmd.exe"? <sisyphus1@nomail.afraid.org>
Re: ActiveState: Can't spawn "cmd.exe"? <sisyphus1@nomail.afraid.org>
Re: Glob Q <jkeen_via_google@yahoo.com>
mod_perl error <alexj@freesurf.ch>
Re: mod_perl error <mark.clementsREMOVETHIS@wanadoo.fr>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 13 Jun 2005 10:36:45 +1000
From: Rick Measham <maildump@isite.net.au>
Subject: Re: ActiveState: Can't spawn "cmd.exe"?
Message-Id: <d8ik8b$ofv$2@nnrp.waia.asn.au>
Daniel Pfeiffer wrote:
> Can't spawn "cmd.exe": No such file or directory at C:/TEMP/cvs/Rule.pm
> line 1128.
Can't be sure what/where your problem is, but cmd.exe is a Norton AV
file. Could be that your external execution is trying to be run through
cmd.exe, but is failing for some reason. Try getting rid of Norton and
run it again.
Cheers!
Rick Measham
------------------------------
Date: Mon, 13 Jun 2005 12:23:08 +1000
From: "Sisyphus" <sisyphus1@nomail.afraid.org>
Subject: Re: ActiveState: Can't spawn "cmd.exe"?
Message-Id: <42acee17$0$16705$afc38c87@news.optusnet.com.au>
"Daniel Pfeiffer" <occitan@esperanto.org> wrote in message
news:42AC1642.1090906@esperanto.org...
> Hi,
>
> I am a developer of makepp.sourceforge.net, a way enhanced (GNU) make
> replacement. I have been busy these last weeks extending the Cygwin port
> first to MinGW (the easy part) and then to ActiveState Perl, with just the
> native Windows 2000 (no Unixy stuff around).
>
> We have an extensive test suite. Most of what fails is related to test
Shell
> scripts, which are beyond the capabilities of the system call. These will
> have to be ported to Perl (in which both makepp and the test harness are
written).
>
> But the test variable_expansion gives an error -1 when running a simple
echo
> command. And additional_tests/2003_10_11_idash is also baffling, with
more
> detailed analysis:
>
> A rule excutes this command (with CC set to the first two words) on one
line.
> This single string gets passed to the system function:
>
> echo nocc -g -I subdir1 -I- -Isubdir2 -c compilation_test.c -o
compilation_test.o
>
> This gives a warning (I installed a $SIG{__WARN__} locally around system):
>
> Can't spawn "cmd.exe": No such file or directory at C:/TEMP/cvs/Rule.pm
line 1128.
>
I don't quite understand. Line 1128 of Rule.pm is:
system( format_exec_args( $action ));
Are you saying that there's no problem with that line on MinGW-built perl,
but there *is* a problem with that line on ActiveState perl ?
If so, then the solution would surely be to ensure that
'format_exec_args($action)' returns the same string with ActiveState perl as
it does for MinGW perl. (Or is that already the case ?)
Precisely what is the full string returned by 'format_exec_args($action)' ?
(I couldn't understand the meaning of "with CC set to the first two words".)
> And system gives a return of 255 << 8. What could be causing this, and
how
> could it be evited?
>
> NB: Passing the identical string to perl -e "system '...'" works just
fine.
>
The "identical string" is the string returned by 'format_exec_args($action)'
..... right ?
And it's working fine in the 'perl -e....' system call, but producing that
error when run from Rule.pm .... right ?
When testing with ActiveState perl what shell are you running in ?
When testing with MinGW perl what shell are you running in ?
Could it be that you're invoking the wrong shell without realising it?
I don't know how to generate the "Can't spawn cmd.exe" error. Anyone ?
Cheers,
Rob
------------------------------
Date: Mon, 13 Jun 2005 13:39:12 +1000
From: "Sisyphus" <sisyphus1@nomail.afraid.org>
Subject: Re: ActiveState: Can't spawn "cmd.exe"?
Message-Id: <42acffee$0$11692$afc38c87@news.optusnet.com.au>
"Sisyphus" <sisyphus1@nomail.afraid.org> wrote in message
news:42acee17$0$16705$afc38c87@news.optusnet.com.au...
>
> "Daniel Pfeiffer" <occitan@esperanto.org> wrote in message
> news:42AC1642.1090906@esperanto.org...
> > Hi,
> >
> > I am a developer of makepp.sourceforge.net, a way enhanced (GNU) make
> > replacement. I have been busy these last weeks extending the Cygwin
port
> > first to MinGW (the easy part) and then to ActiveState Perl, with just
the
> > native Windows 2000 (no Unixy stuff around).
> >
> > We have an extensive test suite. Most of what fails is related to test
> Shell
> > scripts, which are beyond the capabilities of the system call. These
will
> > have to be ported to Perl (in which both makepp and the test harness are
> written).
> >
> > But the test variable_expansion gives an error -1 when running a simple
> echo
> > command. And additional_tests/2003_10_11_idash is also baffling, with
> more
> > detailed analysis:
> >
> > A rule excutes this command (with CC set to the first two words) on one
> line.
> > This single string gets passed to the system function:
> >
> > echo nocc -g -I subdir1 -I- -Isubdir2 -c compilation_test.c -o
> compilation_test.o
> >
> > This gives a warning (I installed a $SIG{__WARN__} locally around
system):
> >
> > Can't spawn "cmd.exe": No such file or directory at C:/TEMP/cvs/Rule.pm
> line 1128.
[snip]
>
> I don't know how to generate the "Can't spawn cmd.exe" error. Anyone ?
>
Oh ... yes I do know how to generate that warning. Just run a system()
command in a shell that doesn't have the path to cmd.exe in its 'path'
environment variable.
eg:
#### test.pl####
use warnings;
system "dir";
__END__
And then, running in the cmd.exe shell:
F:\makepp>set path=
F:\makepp>path
PATH=(null)
F:\>D:\perl58_M\bin\perl -lwe "system 'dir'"
Can't spawn "cmd.exe": No such file or directory at -e line 1.
F:\>D:\perl58_M\bin\perl test.pl
Can't spawn "cmd.exe": No such file or directory at test.pl line 2.
F:\>
I probably need answers to the questions I asked in my earlier reply before
I could speculate further.
Cheers,
Rob
------------------------------
Date: Mon, 13 Jun 2005 13:42:11 +1000
From: "Sisyphus" <sisyphus1@nomail.afraid.org>
Subject: Re: ActiveState: Can't spawn "cmd.exe"?
Message-Id: <42ad00a0$0$24389$afc38c87@news.optusnet.com.au>
"Rick Measham" <maildump@isite.net.au> wrote in message
news:d8ik8b$ofv$2@nnrp.waia.asn.au...
> Daniel Pfeiffer wrote:
> > Can't spawn "cmd.exe": No such file or directory at C:/TEMP/cvs/Rule.pm
> > line 1128.
>
> Can't be sure what/where your problem is, but cmd.exe is a Norton AV
> file. Could be that your external execution is trying to be run through
> cmd.exe, but is failing for some reason. Try getting rid of Norton and
> run it again.
>
'cmd.exe' is also the native Win32 shell program that ships with Windows
NT/2000/XP - and it's *that* cmd.exe (not the Norton file) that's being
sought.
Cheers,
Rob
------------------------------
Date: Mon, 13 Jun 2005 01:18:11 GMT
From: Jim Keenan <jkeen_via_google@yahoo.com>
Subject: Re: Glob Q
Message-Id: <n95re.2177$fa3.396@trndny01>
J Krugman wrote:
> Why is it that I find globs so mysterious? Am I alone in this?
> Or is it a common thing?
>
> Anyway, my question is this: what's the difference between $x, $y,
> and $z in
>
> my $x = *VAR;
> my $y = local *VAR;
> my $z = do { local *VAR };
>
Other than telling you that typeglobs are rarely used these days, I
don't think anyone has grappled with your original question. OTOH, I've
puzzled for days over what the context of your question is.
Suppose that I simply evaluated the 3 variables above:
use Data::Dumper;
my $x = *VAR;
my $y = local *VAR;
my $z = do { local *VAR };
print "$x\n";
print "$y\n";
print "$z\n";
print Dumper($x, $y, $z);
All I get is:
*main::VAR
*main::VAR
*main::VAR
$VAR1 = *::VAR;
$VAR2 = *::VAR;
$VAR3 = *::VAR;
So, at one level, there is no difference among those three things, if by
"difference" we require as a necessary aspect, "must evaluate to
different things."
But I suspect that's not what you meant. Can you give us a more
concrete, contextualized example of a typeglob used in a way you don't
understand?
jimk
------------------------------
Date: Mon, 13 Jun 2005 04:19:41 +0200
From: Alexandre Jaquet <alexj@freesurf.ch>
Subject: mod_perl error
Message-Id: <42aced3e$0$1149$5402220f@news.sunrise.ch>
Hi,
I'm trying to run a script under mod_perl and I got the following error
: ModPerl::Registry : Undefined subroutine CGI:delete
I've done some search about it but didn't find anything.
Here is a short part of my script :
#!perl -w
#TODO : add user input control to avoid sqlinjection and null caracter
use CGI qw(:standard);
use Switch;
use MIME::Lite;
use Digest::MD5 qw(md5_hex);
use DBI;
use Date::Manip;
use POSIX qw(strftime);
use CGI::Session qw/-ip-match/;
use strict;
use warnings;
my $lang, my $logged, my $cookie, my $CGISESSID,
my $LANG, my %VINYL, my %SESSION, my %SERVER,
my %LABEL, my %ERROR, my %VALUE, my $COMMANDID,
my %PAYPALL, my %WISHLIST, my $INDEX;
my $dbh = DBI->connect( "DBI:mysql:recordz:localhost", "xxx", "jaque21" );
$INDEX = '0';
%WISHLIST = ();
%PAYPALL = ();
%VALUE = ();
%ERROR = ();
%LABEL = ();
$LANG = "";
%VINYL = ();
%SESSION = ();
%SERVER = ();
my $query = CGI->new( );
my $action = $query->param('action');
loadLanguage ();
loadError();
sub loadLanguage {
$lang = uc (param('lang'));
my $dir = "C:/indigoperl/apache/htdocs/recordz/lang";
open (FILE, "<$dir/$lang.conf") or die "cannot open file
$dir/$lang.conf";
while (<FILE>) {
(my $label, my $value) = split(/=/);
$SERVER{$label} = $value;
}
close (FILE);
}
sub loadError {
$lang = param('lang');
my $dir = "C:/indigoperl/apache/htdocs/recordz/lang/$lang/error.conf";
open (FILE, "<$dir") or die "cannot open file $dir";
while (<FILE>) {
(my $label, my $value) = split(/=/);
$SERVER{$label} = $value;
}
close (FILE);
}
------------------------------
Date: Mon, 13 Jun 2005 07:00:52 +0200
From: Mark <mark.clementsREMOVETHIS@wanadoo.fr>
Subject: Re: mod_perl error
Message-Id: <42ad12f8$0$884$8fcfb975@news.wanadoo.fr>
Alexandre Jaquet wrote:
> Hi,
>
> I'm trying to run a script under mod_perl and I got the following error
> : ModPerl::Registry : Undefined subroutine CGI:delete
>
> I've done some search about it but didn't find anything.
>
> Here is a short part of my script :
>
<snip>
Your script doesn't contain anything mod_perl specific. Have you copied
and pasted the error message or retyped it? It looks suspicious. Which
version of mod_perl are you using? The API changed in quite a late
2.0.0 release candidate.
I would guess you have a mod_perl installation or configuration issue.
Possibly you have conflicting mod_perl modules on your system. What
happens when you try to run a bare-bones script?
eg
use warnings;
use strict;
use CGI;
BEGIN {
our $test = 0;
};
my CGI $cgi = CGI->new();
our $test;
$test++;
print $cgi->header();
print "count = $test\n";
Mark
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 8168
***************************************