Skip Menu |
 

This queue is for tickets about the Catalyst-Runtime CPAN distribution.

Report information
The Basics
Id: 26455
Status: resolved
Priority: 0/
Queue: Catalyst-Runtime

People
Owner: Nobody in particular
Requestors: m.nooning [...] comcast.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 5.7007
Fixed in: (no value)



Subject: Can't open perl script "and": No such file or
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 2785
Download (untitled) / with headers
text/plain 2.7k
Windows XP, ActiveState Perl 5.8.8 This is the classic Windows versus Unix - missing double quotes problem. The actual directory it should look for is "C:\Documents and Settings\..." To recreate the error, first set certain environment variables prior to running "nmake test". That is, Do this on the command line prior to "nmake test": ----------paste prior to nmake test set TEST_POD=1 set TEST_HTTP=1 set TEST_HTTP=1 set TEST_LIGHTTPD=1 set TEST_LIGHTTPD=1 set TEST_MEMLEAK=1 set TEST_STRESS=1 set TEST_THREADS=1 -------------end paste prior to nmake test Now do "nmake test". On my machine, the test hangs at ------------paste hangs at t/optional_http-server-restart..............................Can't open perl script "and": No such file or dire ctory -----------end paste hangs at It is easier to just do Show quoted text
>prove t\optional_http-server-restart.t
To get past the first part, I went into optional_http-server-restart.t and made the following modifications, starting with commenting out the system command as shown. --------------paste mod 1 #system # "perl -I$FindBin::Bin/../lib $FindBin::Bin/../script/catalyst.pl TestApp"; my $i_lib = $FindBin::Bin . "/../lib"; my $catalyst_pl = $FindBin::Bin . "/../script/catalyst.pl"; if (system( "perl", "-I$i_lib", $catalyst_pl, "TestApp")) { print STDERR ("\n#Cannot system perl -I$i_lib $catalyst_pl TestApp\n"); }; -----------end paste mod 1 ------------paste mod 2 #my $pid = open my $server, #"perl -I$FindBin::Bin/../lib $FindBin::Bin/../t/tmp/TestApp/script/testapp_server.pl -port $port -restart 2>&1 |" # or die "Unable to spawn standalone HTTP server: $!"; my $pid = open my $server, "perl -I\"$i_lib\" \"$FindBin::Bin/../t/tmp/TestApp/script/testapp_server.pl\" -port $port -restart 2>&1 |" or die "Unable to spawn standalone HTTP server: $!"; ------------end paste mod 2 I also put quotes around "$files[$index]" in a couple of places. Now it makes it to where it gives the output shown below. ----------paste final output t\optional_http-server-restart....ok 2/40Server appears to have died at t\optional_http-server-restart.t line 85. # Looks like you planned 40 tests but only ran 2. # Looks like your test died just after 2. -------------end final output I do not know where to go with this from here. The tests are not "Windows directory ready". Is Catalyst? Has anyone out there been successful at installing Catalyst on Windows? Can anyone suggest what else I might do here? By the way, I also made the following change because sleep is not meant for finer granularities than one second. ----------paste sleep change #sleep 0.1; select(undef, undef, undef, 0.1); die "Server appears to have died $port" if $count++ > 50; ----------end paste sleep change Thanks
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.6.HEAD-17998-1176835998-606.26455-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
From: AGRUNDMA [...] cpan.org
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 261
Download (untitled) / with headers
text/plain 261b
Catalyst has worked fine on Windows for a long time. The tests in question are optional and really meant for developers only. Do all the non-optional tests work fine? If so, I wouldn't worry too much. But, could you provide a unified diff of your patches?
MIME-Version: 1.0
In-Reply-To: <rt-3.6.HEAD-17998-1176835998-606.26455-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
References: <rt-3.6.HEAD-17998-1176835998-606.26455-0-0 [...] rt.cpan.org>
Message-Id: <rt-3.6.HEAD-17998-1176841301-1097.26455-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
From: m.nooning [...] comcast.net
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 1493
Download (untitled) / with headers
text/plain 1.4k
7d6 < 29,30c28,37 < system < "perl -I$FindBin::Bin/../lib $FindBin::Bin/../script/catalyst.pl TestApp"; --- Show quoted text
>
Show quoted text
> #system
Show quoted text
> # "perl -I$FindBin::Bin/../lib $FindBin::Bin/../script/catalyst.pl
TestApp"; Show quoted text
>
Show quoted text
> my $i_lib = $FindBin::Bin . "/../lib";
Show quoted text
> my $catalyst_pl = $FindBin::Bin . "/../script/catalyst.pl";
Show quoted text
>
Show quoted text
> if (system( "perl", "-I$i_lib", $catalyst_pl, "TestApp")) {
Show quoted text
> print STDERR ("\n#Cannot system perl -I$i_lib $catalyst_pl TestApp\n");
Show quoted text
> };
31a39 Show quoted text
>
38a47,51 Show quoted text
>
Show quoted text
> #my $pid = open my $server,
Show quoted text
> #"perl -I$FindBin::Bin/../lib
$FindBin::Bin/../t/tmp/TestApp/script/testapp_server.pl -port $port -restart 2>&1 |" Show quoted text
> # or die "Unable to spawn standalone HTTP server: $!";
Show quoted text
>
40c53 < "perl -I$FindBin::Bin/../lib $FindBin::Bin/../t/tmp/TestApp/script/testapp_server.pl -port $port -restart 2>&1 |" --- Show quoted text
> "perl -I\"$i_lib\"
\"$FindBin::Bin/../t/tmp/TestApp/script/testapp_server.pl\" -port $port -restart 2>&1 |" 44a58 Show quoted text
>
59c73 < open my $pm, '>>', $files[$index] --- Show quoted text
> open my $pm, '>>', "$files[$index]"
72c86 < die "Server appears to have died" if $count++ > 50; --- Show quoted text
> die "Server appears to have died $port" if $count++ > 50;
83,84c97,98 < open my $pm, '>>', $files[$index] < or die "Unable to open $files[$index] for writing: $!"; --- Show quoted text
> open my $pm, '>>', "$files[$index]"
Show quoted text
> or die "Unable to open \"$files[$index]\" for writing: $!";
115d128 < print STDERR "Host $host, port $port\n"; #xxxxxxxxx
MIME-Version: 1.0
In-Reply-To: <rt-3.6.HEAD-17998-1176841301-1097.26455-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
References: <rt-3.6.HEAD-17998-1176835998-606.26455-0-0 [...] rt.cpan.org> <rt-3.6.HEAD-17998-1176841301-1097.26455-0-0 [...] rt.cpan.org>
Message-Id: <rt-3.6.HEAD-17943-1176842509-1645.26455-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
From: m.nooning [...] comcast.net
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 1869
Download (untitled) / with headers
text/plain 1.8k
Phooey. I took out the sleep modification. I put it back in and redid the diff (after testing, of course) Show quoted text
>Do all the non-optional tests work fine?
No. See ticket [rt.cpan.org #26452] make test failure in t/c3_mro Can't locate Win32.pm in @INC Show quoted text
>optional and really meant for developers
Outstanding! Here is the diff. ---------------paste diff 7d6 < 29,30c28,37 < system < "perl -I$FindBin::Bin/../lib $FindBin::Bin/../script/catalyst.pl TestApp"; --- Show quoted text
> > #system > # "perl -I$FindBin::Bin/../lib $FindBin::Bin/../script/catalyst.pl
TestApp"; Show quoted text
> > my $i_lib = $FindBin::Bin . "/../lib"; > my $catalyst_pl = $FindBin::Bin . "/../script/catalyst.pl"; > > if (system( "perl", "-I$i_lib", $catalyst_pl, "TestApp")) { > print STDERR ("\n#Cannot system perl -I$i_lib $catalyst_pl TestApp\n"); > };
31a39 Show quoted text
>
38a47,51 Show quoted text
> > #my $pid = open my $server, > #"perl -I$FindBin::Bin/../lib
$FindBin::Bin/../t/tmp/TestApp/script/testapp_server.pl -port $port -restart 2>&1 |" Show quoted text
> # or die "Unable to spawn standalone HTTP server: $!"; >
40c53 < "perl -I$FindBin::Bin/../lib $FindBin::Bin/../t/tmp/TestApp/script/testapp_server.pl -port $port -restart 2>&1 |" --- Show quoted text
> "perl -I\"$i_lib\"
\"$FindBin::Bin/../t/tmp/TestApp/script/testapp_server.pl\" -port $port -restart 2>&1 |" 44a58 Show quoted text
>
59c73 < open my $pm, '>>', $files[$index] --- Show quoted text
> open my $pm, '>>', "$files[$index]"
70,71c84,86 < sleep 0.1; < die "Server appears to have died" if $count++ > 50; --- Show quoted text
> #sleep 0.1; > select(undef, undef, undef, 0.1); > die "Server appears to have died $port" if $count++ > 50;
82,83c97,98 < open my $pm, '>>', $files[$index] < or die "Unable to open $files[$index] for writing: $!"; --- Show quoted text
> open my $pm, '>>', "$files[$index]" > or die "Unable to open \"$files[$index]\" for writing: $!";
---------------end paste diff
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Charset: utf8
Message-Id: <rt-3.6.HEAD-32619-1211809962-604.26455-0-0 [...] rt.cpan.org>
Content-Type: text/plain
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 165
Download (untitled) / with headers
text/plain 165b
Can you resend your patch with the following changes: 1) remove the sections of code you've commented out 2) supply the diff as a unified diff (diff -u) Thank you.
MIME-Version: 1.0
X-Spam-Status: No, hits=-2.6 required=8.0 tests=BAYES_00,SPF_PASS
In-Reply-To: <rt-3.6.HEAD-32619-1211809962-604.26455-6-0 [...] rt.cpan.org>
X-Authority-Analysis: v=1.0 c=1 a=A3VJy1kTm-AA:10 a=PbrOShPaWG8A:10 a=eNcD7ojaAAAA:8 a=T0gvTF6OQu3puCJkV9kA:9 a=w9UNSLKGFefl4jFzfNsA:7 a=--5FaS_cWLBKgDk9hP2Sqpf6KNEA:4 a=ESEIaOzqGKcA:10
References: <RT-Ticket-26455 [...] rt.cpan.org> <rt-3.6.HEAD-32619-1211809962-604.26455-6-0 [...] rt.cpan.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
X-RT-Original-Encoding: utf-8
Received: from x1.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id A56884D8015 for <bug-catalyst-runtime [...] rt.cpan.org>; Mon, 26 May 2008 11:12:59 -0400 (EDT)
Received: (qmail 32581 invoked from network); 26 May 2008 15:12:59 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 26 May 2008 15:12:59 -0000
Received: from qmta03.westchester.pa.mail.comcast.net (HELO QMTA03.westchester.pa.mail.comcast.net) (76.96.62.32) by 16.mx.develooper.com (qpsmtpd/0.43rc1) with ESMTP; Mon, 26 May 2008 08:12:56 -0700
Received: from OMTA08.westchester.pa.mail.comcast.net ([76.96.62.12]) by QMTA03.westchester.pa.mail.comcast.net with comcast id WCsS1Z0060Fqzac5309T00; Mon, 26 May 2008 15:12:15 +0000
Received: from [192.168.0.103] ([67.163.136.159]) by OMTA08.westchester.pa.mail.comcast.net with comcast id WFCt1Z0023SXM7F3U00000; Mon, 26 May 2008 15:12:53 +0000
Delivered-To: cpan-bug+catalyst-runtime [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #26455] Can't open perl script "and": No such file or
User-Agent: Thunderbird 2.0.0.14 (Windows/20080421)
Return-Path: <m.nooning [...] comcast.net>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-catalyst-runtime [...] rt.cpan.org
Date: Mon, 26 May 2008 11:16:26 -0400
X-Spam-Level: *
Message-Id: <483AD44A.4090904 [...] comcast.net>
To: bug-Catalyst-Runtime [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Malcolm Nooning <m.nooning [...] comcast.net>
RT-Message-ID: <rt-3.6.HEAD-32600-1211814860-949.26455-0-0 [...] rt.cpan.org>
Content-Length: 1616
Download (untitled) / with headers
text/plain 1.5k
Oh, my. This is over a year old. I have completely moved away from this. I no longer remember the issues, and certainly the code and the patches are long gone. Oh, wait, I remember the issue. Namely, when using the 'system' command on Windows. The problem is that there is usually one or more spaces in the fully qualified path name of things. For example when executing "C:\Program Files\Perl\bin\perl.exe" within the system command, Windows will try to execute "C:\Program", with "Files\Perl\bin\perl.exe" being an arguement to "C:\Program". The correction seems to be simply to insure that double quotes are around the places indicated in my patch. It is probably easier to put all sections of the 'system' command in double quotes than to figure out what does and does not actually need it. An example from the patch is shown below. Show quoted text
> if (system( "perl", "-I$i_lib", $catalyst_pl, "TestApp")) {
Actually, I would now put it around "$catalyst_pl" as well, because a future user may install catalyst in a directory path that has spaces in it! The above holds true for path names in back ticks, and anywhere a file is being opened. That is why the double quotes are around the example below, which I paste from the already shown patch. open my $pm, '>>', "$files[$index]" Thanks for doing this work, by the way. Brian Cassidy via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=26455 > > > Can you resend your patch with the following changes: > > 1) remove the sections of code you've commented out > 2) supply the diff as a unified diff (diff -u) > > Thank you. > >
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Charset: utf8
Message-Id: <rt-3.6.HEAD-32613-1211849541-917.26455-0-0 [...] rt.cpan.org>
Content-Type: text/plain
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 240
Download (untitled) / with headers
text/plain 240b
So, I've reduced the issue down to running the test suite from a dir with spaces in it -- which also fails on linux, FYI. revision 7809 fixes up optional_http-server.t and optional_http-server-restart.t which should satisfy this rt ticket.
MIME-Version: 1.0
X-Spam-Status: No, hits=-2.6 required=8.0 tests=BAYES_00,SPF_PASS
In-Reply-To: <rt-3.6.HEAD-32613-1211849548-163.26455-10-0 [...] rt.cpan.org>
X-Authority-Analysis: v=1.0 c=1 a=aLsn5GvdvBQA:10 a=rlienyYqnqwA:10 a=eNcD7ojaAAAA:8 a=0fEiOaC8CIg-Im3TFM8A:9 a=LSV0VwhcLv5fZDD62OEooaakQtMA:4 a=zxxVM3CWV3sA:10
References: <rt-3.6.HEAD-32613-1211849548-163.26455-10-0 [...] rt.cpan.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
X-RT-Original-Encoding: utf-8
Received: from x1.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id E48EE4D811A for <bug-catalyst-runtime [...] rt.cpan.org>; Thu, 29 May 2008 18:57:36 -0400 (EDT)
Received: (qmail 9769 invoked from network); 29 May 2008 22:57:35 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 29 May 2008 22:57:35 -0000
Received: from qmta08.emeryville.ca.mail.comcast.net (HELO QMTA08.emeryville.ca.mail.comcast.net) (76.96.30.80) by 16.mx.develooper.com (qpsmtpd/0.43rc1) with ESMTP; Thu, 29 May 2008 15:57:32 -0700
Received: from OMTA08.emeryville.ca.mail.comcast.net ([76.96.30.12]) by QMTA08.emeryville.ca.mail.comcast.net with comcast id XUxj1Z00W0FhH24A80Fl00; Thu, 29 May 2008 22:57:26 +0000
Received: from [192.168.0.103] ([67.163.136.159]) by OMTA08.emeryville.ca.mail.comcast.net with comcast id XaxR1Z0013SXM7F8U00000; Thu, 29 May 2008 22:57:26 +0000
Delivered-To: cpan-bug+catalyst-runtime [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #26455] Resolved: Can't open perl script "and": No such file or
User-Agent: Thunderbird 2.0.0.14 (Windows/20080421)
Return-Path: <m.nooning [...] comcast.net>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-catalyst-runtime [...] rt.cpan.org
Date: Thu, 29 May 2008 19:01:07 -0400
X-Spam-Level: *
Message-Id: <483F35B3.2090904 [...] comcast.net>
To: bug-Catalyst-Runtime [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Malcolm Nooning <m.nooning [...] comcast.net>
RT-Message-ID: <rt-3.6.HEAD-4030-1212101864-1291.26455-0-0 [...] rt.cpan.org>
Content-Length: 300
Download (untitled) / with headers
text/plain 300b
Looks good to me. Please go ahead and close out this ticket. Brian Cassidy via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=26455 > > > According to our records, your request has been resolved. If you have any > further questions or concerns, please respond to this message. > >


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.