Thread: [Module::Build] ./Build on Win98
Status: Beta
Brought to you by:
kwilliams
|
From: Dr B. <la...@ms...> - 2006-02-21 05:17:42
|
I downloaded Randy's tarball, and ran perl Build.PL, .\perl,
.\perl test.
.\perl seemed to run OK. It didn't produce any error messages,
but .\perl test has hung on test 24 of t\compat.t
I also got lots of messages about configuration being created
with 0.2611, but we are now using 0.2707, which I get on Linux
too.
This is a MinGW perl 5.8.2 with dmake, etc.
--
Dr Bean The teacher as the monkey in the works.
Intervention without understanding.
--Dr Bean
|
|
From: Randy W. S. <ml...@th...> - 2006-02-21 07:57:22
|
Dr Bean wrote: > I downloaded Randy's tarball, and ran perl Build.PL, .\perl, > .\perl test. > > .\perl seemed to run OK. It didn't produce any error messages, > but .\perl test has hung on test 24 of t\compat.t I don't see anything that stands out as related to changes I made. From the distro directory, can you run perl Build.PL Build realclean Are there any errors? Was the 'Build.bat' file deleted? Also, t/compat.t is slow, very slow on older systems. How long did you allow it run? What is the output of: Build test --test-files t/compat.t --verbose > I also got lots of messages about configuration being created > with 0.2611, but we are now using 0.2707, which I get on Linux > too. This is odd. Do you have multiple perls in your PATH? Can you post the output with the warnings? > This is a MinGW perl 5.8.2 with dmake, etc. Thanks for reporting your results. Randy. |
|
From: Dr B. <la...@ms...> - 2006-02-21 13:40:22
|
On Tue, 21 Feb 2006, Randy W. Sims wrote:
> I don't see anything that stands out as related to changes I made. From
> the distro directory, can you run
> perl Build.PL
> Build realclean
C:\cpanplus\5.8.2\build\Module-Build>Build realclean
Deleting pod2htmd.tmp
Deleting pod2htmi.tmp
Deleting blib
Deleting _build
Deleting Build
Then there is an NLS message about the right way to call START.
And Build.bat is still there.
> Build test --test-files t/compat.t --verbose
I don't get any output from that line.
> >I also got lots of messages about configuration being created
> >with 0.2611, but we are now using 0.2707, which I get on Linux
> >too.
> This is odd. Do you have multiple perls in your PATH?
No.
> Can you post the
> output with the warnings?
Here is the tail of the Build test output.
t\compat..........NOK 15 * ERROR: Configuration was initially created with Modul
e::Build version '0.2611',
but we are now using version '0.2707'. Please re-run the Build.PL or Makefil
e.PL script.
DMAKE.EXE: Error code 9, while making 'test'
# Failed test (t\compat.t at line 63)
# Failed test (t\compat.t at line 64)
t\compat..........NOK 17# 'DMAKE TEST
# C:ERL\5.8.2\BIN\MSWIN32-X86-MULTI-THREADERL.EXE BUILD --MAKEFILE_ENV_MACRO
S 1 TEST
# '
# doesn't match '(?-xism:DONE\.|SUCCESS)'
* ERROR: Configuration was initially created with Module::Build version '0.2611
',
but we are now using version '0.2707'. Please re-run the Build.PL or Makefil
e.PL script.
DMAKE.EXE: Error code 9, while making 'realclean'
# Failed test (t\compat.t at line 66)
t\compat..........ok 20/60 * ERROR: Configuration was initially created with Mod
ule::Build version '0.2611',
but we are now using version '0.2707'. Please re-run the Build.PL or Makefil
e.PL script.
DMAKE.EXE: Error code 9, while making 'realclean'
# Failed test (t\compat.t at line 185)
t\compat..........ok 24/60
Grepping for 2611 with cygwin,
$ ls
Build.PL Changes MANIFEST.SKIP README doc_check.pl patches website
Build.bat INSTALL META.yml TODO inc scripts
CVS MANIFEST Makefile.PL configs lib t
$ grep -r 2611 *
t/_tmp/Simple/_build/build_params: 'mb_version' => '0.2611',
> >This is a MinGW perl 5.8.2 with dmake, etc.
C:\cpanplus\5.8.2\build\Module-Build>echo %PATH%
C:\CYGWIN\BIN;C:ERL\5.8.2\BIN\MSWIN32-X86-MULTI-THREAD;C:ERL\5.8.2\BIN;C:\M\
BIN;C:ROGRA~1\GPG;C:ROGRA~1\THINKPAD\UTILIT~1;C:\WINDOWS;C:\WINDOWS;C:\WINDO
WS\COMMAND;C:ROGRAM FILES\SUBVERSION\BIN
C:\cpanplus\5.8.2\build\Module-Build>perl -v
This is perl, v5.8.2 built for MSWin32-x86-multi-thread
You can see some cut and paste errors with \P.
-
Dr Bean If there is one thing we learn from the
study of language learning, it is that...
|
|
From: Randy W. S. <ml...@th...> - 2006-02-21 15:26:58
|
Dr Bean wrote: > On Tue, 21 Feb 2006, Randy W. Sims wrote: > > >>I don't see anything that stands out as related to changes I made. From >>the distro directory, can you run > > >> perl Build.PL > > >> Build realclean > > > C:\cpanplus\5.8.2\build\Module-Build>Build realclean > Deleting pod2htmd.tmp > Deleting pod2htmi.tmp > Deleting blib > Deleting _build > Deleting Build > > Then there is an NLS message about the right way to call START. > And Build.bat is still there. Ok, this looks like the source of at least some of the problem. I've uploaded a new tarball to the same location: <http://thepierianspring.org/perl/Module-Build.tar.gz> Could you try it again with the commands perl Build.PL Build realclean Does it still outputs an error? Is the 'Build.bat' file still there? If so, I'll have to find the docs for the start command and for command.com. Could you post them? start /? > help.txt command /? >> help.txt Also, the last line of Build.bat should say something like: start /min "%comspec%" /c del "Build.bat" This is the command we're trying to execute. It seems to have different syntax on different versions of Windows. If it does work, can you run the test suite again? Thanks for the help. Randy. |
|
From: Dr B. <la...@ms...> - 2006-02-22 00:22:18
|
On Tue, 21 Feb 2006, Randy W. Sims wrote:
> Could you try it again with the commands
> perl Build.PL
$ perl Build.PL
Checking whether your kit is complete...
WARNING: the following files are missing in your kit:
t/bundled/Test/Builder.pm
t/bundled/Test/More.pm
t/bundled/Test/Simple.pm
Please inform the author.
Checking prerequisites...
* Optional prerequisite Pod::Readme is not installed
ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the versions
of the modules indicated above before proceeding with this installation
Checking features:
manpage_support....enabled
YAML_support.......enabled
C_support..........disabled
- ExtUtils::CBuilder is not installed
* Optional prerequisite ExtUtils::ParseXS is not installed
HTML_support.......enabled
Creating new 'Build' script for 'Module-Build' version '0.27_07'
$
> Build realclean
$ Build realclean
Deleting _build
Deleting Build
$ ls
Build.PL Changes MANIFEST.SKIP README doc_check.pl patches website
Build.bat INSTALL META.yml TODO inc scripts
CVS MANIFEST Makefile.PL configs lib t
$
That was with a cygwin bash shell. From a command.com shell, perl Build.PL
has teh same messages. Build realclean outputs:
C:\cpanplus\5.8.2\build\Module-Build>Build realclean
Deleting _build
Deleting Build
!!!!!DELETING SELF!!!!!
C:\cpanplus\5.8.2\build\Module-Build>
C:\cpanplus\5.8.2\build\Module-Build>ls
Build.PL INSTALL META.yml TODO inc scripts
CVS MANIFEST Makefile.PL configs lib t
Changes MANIFEST.SKIP README doc_check.pl patches website
So it looks like it's OK on Win98.
Build test hangs at the same point with the command.com shell as
in my last message.
In the bash one, it hangs in t/install.t. Here is the tail of output:
t\compat..........ok 20/60 * ERROR: Configuration was initially created with Mod
ule::Build version '0.2611',
but we are now using version '0.2707'. Please re-run the Build.PL or Makefil
e.PL script.
DMAKE.EXE: Error code 9, while making 'realclean'
# Failed test (t\compat.t at line 185)
t\compat..........ok 47/60 * ERROR: Configuration was initially created with Mod
ule::Build version '0.2611',
but we are now using version '0.2707'. Please re-run the Build.PL or Makefil
e.PL script.
# Looks like you planned 60 tests but only ran 47.
t\compat..........dubious
Test returned status 23 (wstat 5888, 0x1700)
DIED. FAILED tests 5-8, 11, 15-18, 21, 48-60
Failed 23/60 tests, 61.67% okay
t\destinations....Warning: Removing existing directory 'C:\cpanplus\5.8.2\build\
Module-Build\t\_tmp\Simple'
Could not find 'pl2bat.bat' utility needed to make scripts executable.
Unable to convert scripts ( Build ) to executables.
t\destinations....ok
8/92 skipped: various reasons
t\ext.............ok
t\extend..........ok
t\files...........ok
t\install.........ok 21/34
> start /? > help.txt
> command /? >> help.txt
The messages are NLS ones.
> Also, the last line of Build.bat should say something like:
> start /min "%comspec%" /c del "Build.bat"
I can't see anything like that in Build.bat.
It's just wrapping Build apparently, at the start:
@rem = '--*-Perl-*--
@echo off
if "%OS%" == "Windows_NT" goto WinNT
perl -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9
goto endofperl
:WinNT
perl -x -S %0 %*
if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto endofperl
if %errorlevel% == 9009 echo You do not have Perl in your PATH.
if errorlevel 1 goto script_failed_so_exit_with_non_zero_val 2>nul
goto endofperl
@rem ';
#!perl
#line 15
use strict;
and at the end:
# This should have just enough arguments to be able to bootstrap the rest.
my $build = ModuleBuildBuilder->resume (
properties => {
config_dir => '_build',
orig_dir => $orig_dir,
},
);
$build->dispatch;
__END__
:endofperl
Nonetheless, Build realcean is deleting it.
> This is the command we're trying to execute. It seems to have different
> syntax on different versions of Windows.
I can see the NT sytax in Build.bat, but not the Win98.
--
Dr Bean The best jokes are
those you play on
yourself.
|
|
From: Randy W. S. <ml...@th...> - 2006-02-22 23:54:29
|
Dr Bean wrote: > On Tue, 21 Feb 2006, Randy W. Sims wrote: > >> Could you try it again with the commands > >> perl Build.PL > > $ perl Build.PL > Checking whether your kit is complete... > WARNING: the following files are missing in your kit: > t/bundled/Test/Builder.pm > t/bundled/Test/More.pm > t/bundled/Test/Simple.pm > Please inform the author. > > Checking prerequisites... > * Optional prerequisite Pod::Readme is not installed > > ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the versions > of the modules indicated above before proceeding with this installation > > Checking features: > manpage_support....enabled > YAML_support.......enabled > C_support..........disabled > - ExtUtils::CBuilder is not installed > * Optional prerequisite ExtUtils::ParseXS is not installed > HTML_support.......enabled > > Creating new 'Build' script for 'Module-Build' version '0.27_07' > $ > >> Build realclean > > $ Build realclean > Deleting _build > Deleting Build > $ ls > Build.PL Changes MANIFEST.SKIP README doc_check.pl patches website > Build.bat INSTALL META.yml TODO inc scripts > CVS MANIFEST Makefile.PL configs lib t > $ > > That was with a cygwin bash shell. Maybe the directory was dirty? When I try on Cygwin under WinXP, the 'Build.bat' is not created. Everything works. All tests pass. Everything gets cleaned up. > From a command.com shell, perl Build.PL > has teh same messages. Build realclean outputs: > > C:\cpanplus\5.8.2\build\Module-Build>Build realclean > Deleting _build > Deleting Build > !!!!!DELETING SELF!!!!! > C:\cpanplus\5.8.2\build\Module-Build> > C:\cpanplus\5.8.2\build\Module-Build>ls > Build.PL INSTALL META.yml TODO inc scripts > CVS MANIFEST Makefile.PL configs lib t > Changes MANIFEST.SKIP README doc_check.pl patches website > > So it looks like it's OK on Win98. Great. This should get me to a final solution with a little reworking. I also just realized that my initial attempts depend on $0 which wont work for our API clients; I'll get this cleaned up. > Build test hangs at the same point with the command.com shell as > in my last message. Is this a pre-existing problem? Could you please try one of the earlier 0.27x developer snapshots: <http://search.cpan.org/~kwilliams/Module-Build-0.27_07/> Thanks for helping with this, Randy. |
|
From: Randy W. S. <ml...@th...> - 2006-02-23 04:32:25
|
Randy W. Sims wrote: > Dr Bean wrote: >> So it looks like it's OK on Win98. > > Great. This should get me to a final solution with a little reworking. I > also just realized that my initial attempts depend on $0 which wont work > for our API clients; I'll get this cleaned up. This is hopefully fixed now in CVS, and a new snapshot is up also[1] if I can beg one more test. We now differentiate syntax of the command to delete ourself depending on Win9x or WinNT variant. Also, appending the command to delete ourself to the 'Build.bat' means that the old 'perl Build realclean' quit working. It was necessary to differentiate between the two ways of invoking Build. The best option I could think of was to use pl2bat to change the way it calls perl by appending an extra option (--build_bat). If this option is present, the Build.bat file was executed, so we can append the self-deletion command to that file. Otherwise, 'perl Build' was called, so it's safe to delete the file from within M::B. This also takes care of the issue of other programs calling realclean from the API. Randy. 1. <http://thepierianspring.org/perl/Module-Build.tar.gz> |
|
From: Dr B. <gr...@mo...> - 2006-02-24 14:45:59
|
On Wed, 22 Feb 2006, Randy W. Sims wrote:
> >I also just realized that my initial attempts depend on $0
> >which wont work for our API clients; I'll get this cleaned up.
> This is hopefully fixed now in CVS, and a new snapshot is up also[1] if
> I can beg one more test.
I found a different Win98 machine with ActiveState
5.8.7.815. After running perl Build.PL:
D:\greg\Module-Build>dir Build
Volume in drive D has no label
Volume Serial Number is 4658-17D7
Directory of D:\greg\Module-Build
BUILD PL 2,591 02-02-06 8:19 Build.PL
BUILD 1,472 02-24-06 22:00 Build
BUILD BAT 1,943 02-24-06 22:00 Build.bat
3 file(s) 6,006 bytes
0 dir(s) 13,728.44 MB free
D:\greg\Module-Build> Build realclean
Deleting _build
Deleting Build
Deleting Build.bat
Batch file missing
D:\greg\Module-Build>dir Build
Volume in drive D has no label
Volume Serial Number is 4658-17D7
Directory of D:\greg\Module-Build
BUILD PL 2,591 02-02-06 8:19 Build.PL
1 file(s) 2,591 bytes
0 dir(s) 13,728.67 MB free
But now it is hanging on subtest 12 of t\basic.t
--
Dr Bean Success is going from failure
to failure without a loss of
enthusiasm-- Winston Churchill
|
|
From: Randy W. S. <ml...@th...> - 2006-02-25 02:27:42
|
Dr Bean wrote: > On Wed, 22 Feb 2006, Randy W. Sims wrote: > >>> I also just realized that my initial attempts depend on $0 >>> which wont work for our API clients; I'll get this cleaned up. > >> This is hopefully fixed now in CVS, and a new snapshot is up also[1] if >> I can beg one more test. > > I found a different Win98 machine with ActiveState > 5.8.7.815. After running perl Build.PL: > > D:\greg\Module-Build>dir Build > > Volume in drive D has no label > Volume Serial Number is 4658-17D7 > Directory of D:\greg\Module-Build > > BUILD PL 2,591 02-02-06 8:19 Build.PL > BUILD 1,472 02-24-06 22:00 Build > BUILD BAT 1,943 02-24-06 22:00 Build.bat > 3 file(s) 6,006 bytes > 0 dir(s) 13,728.44 MB free > > > D:\greg\Module-Build> Build realclean > Deleting _build > Deleting Build > Deleting Build.bat > Batch file missing It's taking the wrong path here. M::B is deleting 'Build.bat' where it should be letting it delete itself. We know this method of self-deletion works because it was proved in a previous attempt. The only issue here is that the created 'Build.bat' is not correctly passing in the --build_bat argument. To prove this you should be able to: perl Build.PL Build --build_bat realclean and get a successful run without error about missing batch file. If you run: perl Build.PL and then look at the top of the resulting 'Build.bat', you should see the following lines: if "%OS%" == "Windows_NT" goto WinNT perl -x -S "%0" "--build_bat" %1 %2 %3 %4 %5 %6 %7 %8 %9 goto endofperl :WinNT perl -x -S "%0" "--build_bat" %* I'd like to know if the resulting 'Build.bat' differs on Win9x. I suspect not. Otherwise the invokation of perl from the batch file would cause errors or different behavior. At one time those quotes around the --build_bat arg seemed necessary, but it may be the cause of the problem; Although, I don't see why they should matter one way or the other. I've removed those quotes, and instrumented the code to see if I can find out where the argument is going. Care to give it another spin? <http://thepierianspring.org/perl/Module-Build.tar.gz> perl Build.PL Build realclean if exist Build.bat echo profanity How many cases do I owe you now? Randy. |
|
From: Dr B. <gr...@mo...> - 2006-02-25 07:43:23
|
On Fri, 24 Feb 2006, Randy W. Sims wrote:
> >D:\greg\Module-Build> Build realclean
> >Deleting _build
> >Deleting Build
> >Deleting Build.bat
> >Batch file missing
> It's taking the wrong path here. M::B is deleting 'Build.bat' where it
> should be letting it delete itself. We know this method of self-deletion
> works because it was proved in a previous attempt. The only issue here
> is that the created 'Build.bat' is not correctly passing in the
> --build_bat argument. To prove this you should be able to:
> perl Build.PL
> Build --build_bat realclean
D:\greg\Module-Build>Build --build_bat realclean
Deleting _build
Deleting Build
D:\greg\Module-Build>dir build
Volume in drive D has no label
Volume Serial Number is 4658-17D7
Directory of D:\greg\Module-Build
BUILD PL 2,591 02-02-06 8:19 Build.PL
1 file(s) 2,591 bytes
0 dir(s) 13,721.52 MB free
> and get a successful run without error about missing batch file.
OK.
> If you run:
> perl Build.PL
> and then look at the top of the resulting 'Build.bat', you should see
> the following lines:
> if "%OS%" == "Windows_NT" goto WinNT
> perl -x -S "%0" "--build_bat" %1 %2 %3 %4 %5 %6 %7 %8 %9
> goto endofperl
> :WinNT
> perl -x -S "%0" "--build_bat" %*
> I'd like to know if the resulting 'Build.bat' differs on Win9x. I
> suspect not. Otherwise the invokation of perl from the batch file would
> cause errors or different behavior.
@rem = '--*-Perl-*--
@echo off
if "%OS%" == "Windows_NT" goto WinNT
perl -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9
goto endofperl
:WinNT
perl -x -S "%0" --build_bat 0" --build_bat %1 %2 %3 %4 %5 %6 %7 %8 %9
if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto endofperl
if %errorlevel% == 9009 echo You do not have Perl in your PATH.
if errorlevel 1 goto script_failed_so_exit_with_non_zero_val 2>nul
goto endofperl
@rem ';
#!perl
#line 15
They are not the same.
But if I substitute
perl -x -S "%0" "--build_bat" %1 %2 %3 %4 %5 %6 %7 %8 %9
for the invocation line, Build realclean deletes Build.bat,
Volume in drive D has no label
Volume Serial Number is 4658-17D7
Directory of D:\greg\Module-Build
BUILD PL 2,591 02-02-06 8:19 Build.PL
BUILD 1,472 02-25-06 15:18 Build
BUILD BAT 1,943 02-25-06 15:18 Build.bat
3 file(s) 6,006 bytes
0 dir(s) 13,721.28 MB free
D:\greg\Module-Build>Build realclean
Deleting _build
Deleting Build
D:\greg\Module-Build>dir build
Volume in drive D has no label
Volume Serial Number is 4658-17D7
Directory of D:\greg\Module-Build
BUILD PL 2,591 02-02-06 8:19 Build.PL
1 file(s) 2,591 bytes
0 dir(s) 13,721.52 MB free
D:\greg\Module-Build>
and Build --build_bat realclean does too.
D:\greg\Module-Build>Build --build_bat realclean
Deleting _build
Deleting Build
D:\greg\Module-Build>dir build
Volume in drive D has no label
Volume Serial Number is 4658-17D7
Directory of D:\greg\Module-Build
BUILD PL 2,591 02-02-06 8:19 Build.PL
1 file(s) 2,591 bytes
0 dir(s) 13,721.52 MB free
D:\greg\Module-Build>
> At one time those quotes around the --build_bat arg seemed necessary,
> but it may be the cause of the problem; Although, I don't see why they
> should matter one way or the other. I've removed those quotes, and
> instrumented the code to see if I can find out where the argument is going.
> Care to give it another spin?
> <http://thepierianspring.org/perl/Module-Build.tar.gz>
> perl Build.PL
> Build realclean
> if exist Build.bat echo profanity
D:\greg\Module-Build>Build realclean
Deleting _build
Deleting Build
########################################
build_bat: 0
$VAR1 = 'ARGV';
$VAR2 = [];
########################################
Deleting Build.bat
Batch file missing
D:\greg\Module-Build>Build --build_bat realclean
Deleting _build
Deleting Build
########################################
build_bat: 1
$VAR1 = 'ARGV';
$VAR2 = [];
########################################
D:\greg\Module-Build>dir build
Volume in drive D has no label
Volume Serial Number is 4658-17D7
Directory of D:\greg\Module-Build
BUILD PL 2,591 02-02-06 8:19 Build.PL
1 file(s) 2,591 bytes
0 dir(s) 13,721.61 MB free
And with the same changes to the perl invocation args as above:
D:\greg\Module-Build>Build realclean
Deleting _build
Deleting Build
########################################
build_bat: 1
$VAR1 = 'ARGV';
$VAR2 = [];
########################################
D:\greg\Module-Build>dir build
Volume in drive D has no label
Volume Serial Number is 4658-17D7
Directory of D:\greg\Module-Build
BUILD PL 2,591 02-02-06 8:19 Build.PL
1 file(s) 2,591 bytes
0 dir(s) 13,721.61 MB free
And the same with Build --build_bat realclean
So it seems that the behavior is the same between the 2 versions.
--
Dr Bean
|
|
From: Randy W. S. <ml...@th...> - 2006-02-25 19:32:41
|
Dr Bean wrote: > On Fri, 24 Feb 2006, Randy W. Sims wrote: >>I'd like to know if the resulting 'Build.bat' differs on Win9x. I >>suspect not. Otherwise the invokation of perl from the batch file would >>cause errors or different behavior. > > > @rem = '--*-Perl-*-- > @echo off > if "%OS%" == "Windows_NT" goto WinNT > perl -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9 > goto endofperl > :WinNT > perl -x -S "%0" --build_bat 0" --build_bat %1 %2 %3 %4 %5 %6 %7 %8 %9 Ok, here's the problem. The quoting is wrong in the invokation of pl2bat. Both arguments to pl2bat got bungled into one misformed arg. I need to figure out how to invoke pl2bat from the command line with corrected quoting. The command we're using now, that produces the bungled last line above is: pl2bat -n "-x -S """%0""" --build_bat %*" -o "-x -S """%0""" --build_bat %1 %2 %3 %4 %5 %6 %7 %8 %9" < Build > Build.bat It looks like it is trying to expand %*" -o "-x -S """% as an evironment var. Maybe an extra space after %*: pl2bat -n "-x -S """%0""" --build_bat %* " -o "-x -S """%0""" --build_bat %1 %2 %3 %4 %5 %6 %7 %8 %9 " < Build > Build.bat Otherwise, I'm not sure how to quote the percent symbol (%%* doesn't work). I've posted a message over on alt.msdos.batch about this. Meanwhile, maybe the above command will produce a valid Build.bat file? Randy. |
|
From: Ken W. <ke...@ma...> - 2006-02-25 20:57:45
|
On Feb 25, 2006, at 1:32 PM, Randy W. Sims wrote: > Ok, here's the problem. The quoting is wrong in the invokation of > pl2bat. Both arguments to pl2bat got bungled into one misformed > arg. I need to figure out how to invoke pl2bat from the command > line with corrected quoting. The command we're using now, that > produces the bungled last line above is: > > pl2bat -n "-x -S """%0""" --build_bat %*" -o "-x -S """%0""" -- > build_bat %1 %2 %3 %4 %5 %6 %7 %8 %9" < Build > Build.bat > > It looks like it is trying to expand %*" -o "-x -S """% as an > evironment var. Maybe an extra space after %*: > > pl2bat -n "-x -S """%0""" --build_bat %* " -o "-x -S """%0""" -- > build_bat %1 %2 %3 %4 %5 %6 %7 %8 %9 " < Build > Build.bat > > Otherwise, I'm not sure how to quote the percent symbol (%%* > doesn't work). I've posted a message over on alt.msdos.batch about > this. Won't the multi-argument form of system() be helpful here? It's generally much easier to get that to work out than trying to get quoting right. -Ken |
|
From: Randy W. S. <ml...@th...> - 2006-03-01 02:33:07
|
Ken Williams wrote: > > On Feb 25, 2006, at 1:32 PM, Randy W. Sims wrote: > >> Ok, here's the problem. The quoting is wrong in the invokation of >> pl2bat. Both arguments to pl2bat got bungled into one misformed arg. I >> need to figure out how to invoke pl2bat from the command line with >> corrected quoting. The command we're using now, that produces the >> bungled last line above is: >> >> pl2bat -n "-x -S """%0""" --build_bat %*" -o "-x -S """%0""" >> --build_bat %1 %2 %3 %4 %5 %6 %7 %8 %9" < Build > Build.bat >> >> It looks like it is trying to expand %*" -o "-x -S """% as an >> evironment var. Maybe an extra space after %*: >> >> pl2bat -n "-x -S """%0""" --build_bat %* " -o "-x -S """%0""" >> --build_bat %1 %2 %3 %4 %5 %6 %7 %8 %9 " < Build > Build.bat >> >> Otherwise, I'm not sure how to quote the percent symbol (%%* doesn't >> work). I've posted a message over on alt.msdos.batch about this. > > Won't the multi-argument form of system() be helpful here? It's > generally much easier to get that to work out than trying to get quoting > right. It doesn't seem so... In order to use redirection in the command that's executed, the shell must be invoked. If you use the multiple arg form of system, you have to explicitly specify the shell. The problem is the shell then requires the syntax: $shell /C "$string" I.E. it only accepts a single string to execute. Using the undocumented(?) trick of passing a 1 as the first arg to system() doesn't help here either. I still haven't received a solution on alt.msdos.batch. Maybe we can fudge a solution. If we rearrange the line so that the problem part is at the end of the string, it won't matter if quoting is wrong: it will be terminated by the end of line. This is a big kludge IMO, but until something else presents here is a snapshot to try out. <http://thepierianspring.org/perl/Module-Build.tar.gz> perl Build.PL Build realclean if not exist Build.bat echo hallelujah perl Build.PL perl Build realclean if not exist Build.bat echo hallelujah perl Build.PL If everything works could you post the batch heading of Build.bat? Build Build test Build realclean Thanks, Randy. |
|
From: David G. <da...@hy...> - 2006-03-01 03:31:59
|
Randy W. Sims wrote:
>>> Otherwise, I'm not sure how to quote the percent symbol (%%* doesn't
>>> work). I've posted a message over on alt.msdos.batch about this.
>>
>> Won't the multi-argument form of system() be helpful here? It's
>> generally much easier to get that to work out than trying to get
>> quoting right.
>
> It doesn't seem so... In order to use redirection in the command that's
> executed, the shell must be invoked. If you use the multiple arg form of
> system, you have to explicitly specify the shell. The problem is the
> shell then requires the syntax:
>
> $shell /C "$string"
I've been deleting this thread for a while for lack of time to read it,
but caught up briefly here. I apologize if this has been discussed
already or you're well beyond it, but Roderich Schupp and I had a short
exchange a while ago about windows shell quoting in discussing
improvement to IPC::Run3. In short, we concluded it's really ugly. By
triangulating between Perl, Haskell and gtk/glib source and comments, he
came up with the following escaping algorithm:
sub protect_argv_string
{
my ($p) = @_;
(my $q = $p) =~ s/(\\*)"/$1$1\\"/g;
$q = qq["$q"] if $p =~ /[ \t]/;
return $q;
}
That said, I don't think we ever came up with a way of properly escaping
"%". You can precede it with a backslash it to prevent it from being
interpreted as an environment variable, but the backslash itself appears
in the output.
Regards,
David
|
|
From: Ken W. <ke...@ma...> - 2006-03-01 04:49:47
|
On Feb 28, 2006, at 8:33 PM, Randy W. Sims wrote: > Ken Williams wrote: >> On Feb 25, 2006, at 1:32 PM, Randy W. Sims wrote: >>> Ok, here's the problem. The quoting is wrong in the invokation of >>> pl2bat. Both arguments to pl2bat got bungled into one misformed >>> arg. I need to figure out how to invoke pl2bat from the command >>> line with corrected quoting. The command we're using now, that >>> produces the bungled last line above is: >>> >>> pl2bat -n "-x -S """%0""" --build_bat %*" -o "-x -S """%0""" -- >>> build_bat %1 %2 %3 %4 %5 %6 %7 %8 %9" < Build > Build.bat >>> >>> It looks like it is trying to expand %*" -o "-x -S """% as an >>> evironment var. Maybe an extra space after %*: >>> >>> pl2bat -n "-x -S """%0""" --build_bat %* " -o "-x -S """%0""" -- >>> build_bat %1 %2 %3 %4 %5 %6 %7 %8 %9 " < Build > Build.bat >>> >>> Otherwise, I'm not sure how to quote the percent symbol (%%* >>> doesn't work). I've posted a message over on alt.msdos.batch >>> about this. >> Won't the multi-argument form of system() be helpful here? It's >> generally much easier to get that to work out than trying to get >> quoting right. > > It doesn't seem so... In order to use redirection in the command > that's executed, the shell must be invoked. Yuck. Short of converting pl2bat into module form, is there some other sneaky solution? Maybe set @ARGV and then do($pl2bat), with STDOUT tied? If there's one thing I hate, it's shell quoting just to call another set of perl code. -Ken |
|
From: Randy W. S. <ml...@th...> - 2006-03-01 23:17:27
|
Ken Williams wrote: > > On Feb 28, 2006, at 8:33 PM, Randy W. Sims wrote: > >> Ken Williams wrote: >>> On Feb 25, 2006, at 1:32 PM, Randy W. Sims wrote: >>>> Ok, here's the problem. The quoting is wrong in the invokation of >>>> pl2bat. Both arguments to pl2bat got bungled into one misformed arg. >>>> I need to figure out how to invoke pl2bat from the command line with >>>> corrected quoting. The command we're using now, that produces the >>>> bungled last line above is: >>>> >>>> pl2bat -n "-x -S """%0""" --build_bat %*" -o "-x -S """%0""" >>>> --build_bat %1 %2 %3 %4 %5 %6 %7 %8 %9" < Build > Build.bat >>>> >>>> It looks like it is trying to expand %*" -o "-x -S """% as an >>>> evironment var. Maybe an extra space after %*: >>>> >>>> pl2bat -n "-x -S """%0""" --build_bat %* " -o "-x -S """%0""" >>>> --build_bat %1 %2 %3 %4 %5 %6 %7 %8 %9 " < Build > Build.bat >>>> >>>> Otherwise, I'm not sure how to quote the percent symbol (%%* doesn't >>>> work). I've posted a message over on alt.msdos.batch about this. >>> Won't the multi-argument form of system() be helpful here? It's >>> generally much easier to get that to work out than trying to get >>> quoting right. >> >> It doesn't seem so... In order to use redirection in the command >> that's executed, the shell must be invoked. > > Yuck. Short of converting pl2bat into module form, is there some other > sneaky solution? Maybe set @ARGV and then do($pl2bat), with STDOUT tied? > > If there's one thing I hate, it's shell quoting just to call another set > of perl code. All the solutions I can think of, and the one you mention above are all variations on a theme. None of them are ideal, so I have no outstanding preference. Options are: 1) Rearrange the command to put the unquotable(?) construct at the end of the command line. Subject to fail later when code is modified and inadvertently changes order. 2) Stuff @ARGV and do 'pl2bat.bat' as you suggest. Makes me nervous; kinda depends on knowing pl2bat internals are safe to C<do>. Also, more hoops because we have to tie stdin & stdout in place of redirection. 3) Wrap pl2bat in a module and publish it. 4) Copy the code from pl2bat[1] directly into M::B::P::Windows; It's short, and can be abbreviated somewhat for our purpose, but it still duplicates code. I probably like (1) the least, and I guess I lean more towards (3) or (4) Your preference? Randy. 1. <http://search.cpan.org/src/NWCLARK/perl-5.8.8/win32/bin/pl2bat.pl> |
|
From: demerphq <dem...@gm...> - 2006-03-02 00:58:14
|
On 3/2/06, Randy W. Sims <ml...@th...> wrote: > Ken Williams wrote: > > > > On Feb 28, 2006, at 8:33 PM, Randy W. Sims wrote: > > > >> Ken Williams wrote: > >>> On Feb 25, 2006, at 1:32 PM, Randy W. Sims wrote: > >>>> Ok, here's the problem. The quoting is wrong in the invokation of > >>>> pl2bat. Both arguments to pl2bat got bungled into one misformed arg. > >>>> I need to figure out how to invoke pl2bat from the command line with > >>>> corrected quoting. The command we're using now, that produces the > >>>> bungled last line above is: > >>>> > >>>> pl2bat -n "-x -S """%0""" --build_bat %*" -o "-x -S """%0""" > >>>> --build_bat %1 %2 %3 %4 %5 %6 %7 %8 %9" < Build > Build.bat > >>>> > >>>> It looks like it is trying to expand %*" -o "-x -S """% as an > >>>> evironment var. Maybe an extra space after %*: > >>>> > >>>> pl2bat -n "-x -S """%0""" --build_bat %* " -o "-x -S """%0""" > >>>> --build_bat %1 %2 %3 %4 %5 %6 %7 %8 %9 " < Build > Build.bat > >>>> > >>>> Otherwise, I'm not sure how to quote the percent symbol (%%* doesn't > >>>> work). I've posted a message over on alt.msdos.batch about this. > >>> Won't the multi-argument form of system() be helpful here? It's > >>> generally much easier to get that to work out than trying to get > >>> quoting right. > >> > >> It doesn't seem so... In order to use redirection in the command > >> that's executed, the shell must be invoked. > > > > Yuck. Short of converting pl2bat into module form, is there some other > > sneaky solution? Maybe set @ARGV and then do($pl2bat), with STDOUT tie= d? > > > > If there's one thing I hate, it's shell quoting just to call another se= t > > of perl code. > > All the solutions I can think of, and the one you mention above are all > variations on a theme. None of them are ideal, so I have no outstanding > preference. Options are: > > 1) Rearrange the command to put the unquotable(?) construct at the end > of the command line. Subject to fail later when code is modified and > inadvertently changes order. > > 2) Stuff @ARGV and do 'pl2bat.bat' as you suggest. Makes me nervous; > kinda depends on knowing pl2bat internals are safe to C<do>. Also, more > hoops because we have to tie stdin & stdout in place of redirection. > > 3) Wrap pl2bat in a module and publish it. > > 4) Copy the code from pl2bat[1] directly into M::B::P::Windows; It's > short, and can be abbreviated somewhat for our purpose, but it still > duplicates code. > > I probably like (1) the least, and I guess I lean more towards (3) or (4) > > Your preference? FWIW: #3 Yves -- perl -Mre=3Ddebug -e "/just|another|perl|hacker/" |
|
From: Ken W. <ke...@ma...> - 2006-03-02 02:25:07
|
On Mar 1, 2006, at 5:17 PM, Randy W. Sims wrote: > All the solutions I can think of, and the one you mention above are > all variations on a theme. None of them are ideal, so I have no > outstanding preference. Options are: > > 1) Rearrange the command to put the unquotable(?) construct at the > end of the command line. Subject to fail later when code is > modified and inadvertently changes order. > > 2) Stuff @ARGV and do 'pl2bat.bat' as you suggest. Makes me > nervous; kinda depends on knowing pl2bat internals are safe to > C<do>. Also, more hoops because we have to tie stdin & stdout in > place of redirection. > > 3) Wrap pl2bat in a module and publish it. > > 4) Copy the code from pl2bat[1] directly into M::B::P::Windows; > It's short, and can be abbreviated somewhat for our purpose, but it > still duplicates code. > > I probably like (1) the least, and I guess I lean more towards (3) > or (4) #3 is certainly The High Road, but it introduces a platform-specific dependency, and would break from our current rule of no required dependencies past what's in perl 5.6. Other than that there's probably no downside. #4 is probably the easiest to do in the short term, and actually might be a decent temporary measure on the way toward #3. How about that, and then we can plan to publish it separately after 0.28? -Ken |
|
From: Randy W. S. <ml...@th...> - 2006-03-03 20:26:38
|
Ken Williams wrote: > > On Mar 1, 2006, at 5:17 PM, Randy W. Sims wrote: > >> All the solutions I can think of, and the one you mention above are >> all variations on a theme. None of them are ideal, so I have no >> outstanding preference. Options are: >> >> 1) Rearrange the command to put the unquotable(?) construct at the >> end of the command line. Subject to fail later when code is modified >> and inadvertently changes order. >> >> 2) Stuff @ARGV and do 'pl2bat.bat' as you suggest. Makes me nervous; >> kinda depends on knowing pl2bat internals are safe to C<do>. Also, >> more hoops because we have to tie stdin & stdout in place of >> redirection. >> >> 3) Wrap pl2bat in a module and publish it. >> >> 4) Copy the code from pl2bat[1] directly into M::B::P::Windows; It's >> short, and can be abbreviated somewhat for our purpose, but it still >> duplicates code. >> >> I probably like (1) the least, and I guess I lean more towards (3) or >> (4) > > > #3 is certainly The High Road, but it introduces a platform-specific > dependency, and would break from our current rule of no required > dependencies past what's in perl 5.6. Other than that there's probably > no downside. > > #4 is probably the easiest to do in the short term, and actually might > be a decent temporary measure on the way toward #3. How about that, > and then we can plan to publish it separately after 0.28? I got this mostly done last night: <http://thepierianspring.org/perl/Module-Build.tar.gz> I just need to review and test, hopefully getting one more round of tests from Win98 land. Also, I need to update the docs. It mostly duplicates pl2bat with some minor exceptions, but it also cleaned up M::B::P::Windows.pm a good bit: eliminated the constructor override, the _find_pl2bat() method, and greatly simplified the make_executable() method. It works for me. I'll problably check it in sometime this evening, after docs & review; there is no variation in this area on Win98 anymore, so I don't expect failure there related to this issue. Randy. |
|
From: Ken W. <ke...@ma...> - 2006-03-03 22:13:45
|
On Mar 3, 2006, at 2:26 PM, Randy W. Sims wrote: > I got this mostly done last night: > > <http://thepierianspring.org/perl/Module-Build.tar.gz> > > I just need to review and test, hopefully getting one more round of > tests from Win98 land. Also, I need to update the docs. > > It mostly duplicates pl2bat with some minor exceptions, but it also > cleaned up M::B::P::Windows.pm a good bit: eliminated the > constructor override, the _find_pl2bat() method, and greatly > simplified the make_executable() method. It works for me. Yay! > > I'll problably check it in sometime this evening, after docs & > review; there is no variation in this area on Win98 anymore, so I > don't expect failure there related to this issue. Cool. -Ken |
|
From: Randy W. S. <ml...@th...> - 2006-03-04 01:04:17
|
Ken Williams wrote: > > On Mar 3, 2006, at 2:26 PM, Randy W. Sims wrote: > >> I got this mostly done last night: >> >> <http://thepierianspring.org/perl/Module-Build.tar.gz> >> >> I just need to review and test, hopefully getting one more round of >> tests from Win98 land. Also, I need to update the docs. >> >> It mostly duplicates pl2bat with some minor exceptions, but it also >> cleaned up M::B::P::Windows.pm a good bit: eliminated the constructor >> override, the _find_pl2bat() method, and greatly simplified the >> make_executable() method. It works for me. > > Yay! > >> >> I'll problably check it in sometime this evening, after docs & review; >> there is no variation in this area on Win98 anymore, so I don't expect >> failure there related to this issue. > > Cool. After further cleanup and testing, I've checked in the changes with doc tweaks. Randy. |
|
From: Ken W. <ke...@ma...> - 2006-03-04 16:05:18
|
On Mar 3, 2006, at 7:04 PM, Randy W. Sims wrote: > > After further cleanup and testing, I've checked in the changes with > doc tweaks. > Great. I've released the current snapshot (before adding the testpodcoverage action) as a new beta. Very Little To Do Before 0.28 Now. -Ken |
|
From: Randy W. S. <ml...@th...> - 2006-03-05 01:54:59
|
Ken Williams wrote: > > On Mar 3, 2006, at 7:04 PM, Randy W. Sims wrote: > >> >> After further cleanup and testing, I've checked in the changes with >> doc tweaks. >> > > Great. I've released the current snapshot (before adding the > testpodcoverage action) as a new beta. > > Very Little To Do Before 0.28 Now. Cool. Much thanks to Dr Bean, Ron, Yves, and others who helped with testing, isolating the problem and providing feedback. Randy. |
|
From: Dr B. <gr...@mo...> - 2006-03-07 07:25:15
|
On Fri, 03 Mar 2006, Randy W. Sims wrote: > <http://thepierianspring.org/perl/Module-Build.tar.gz> > I just need to review and test, hopefully getting one more round of > tests from Win98 land. Also, I need to update the docs. On Win98 D:\greg\Module-Build>Build realclean Deleting pod2htmd.tmp Deleting pod2htmi.tmp Deleting blib Deleting _build Deleting Build ... D:\greg\Module-Build>perl Build realclean Deleting _build Deleting Build Deleting Build.bat Tests are good too. Failed Test Stat Wstat Total Fail Failed List of Failed -------------------------------------------------------------------------- t\install.t 2 512 34 2 5.88% 23 25 4 tests and 27 subtests skipped. Failed 1/20 test scripts, 95.00% okay. 2/569 subtests failed, 99.65% okay. t\install.........ok 10/34Can't locate Module/Build.pm in @INC (@INC contains: t /lib t\bundled C:/Perl/lib C:/Perl/site/lib .) at Build.PL line 1. BEGIN failed--compilation aborted at Build.PL line 1. Can't open perl script "Build": No such file or directory # Failed test (t\install.t at line 233) # Expected D:\greg\Module-Build\t\install_test\foo\lib\Simple.pm to exist, but i t doesn't t\install.........NOK 23Can't open perl script "Build": No such file or director y # Failed test (t\install.t at line 170) # got: undef # expected: '1' t\install.........NOK 25# Looks like you failed 2 tests of 34. t\install.........dubious Test returned status 2 (wstat 512, 0x200) DIED. FAILED tests 23, 25 Failed 2/34 tests, 94.12% okay D:\greg\Module-Build>dir build Volume in drive D has no label Volume Serial Number is 4658-17D7 Directory of D:\greg\Module-Build BUILD PL 2,591 02-02-06 8:19 Build.PL BUILD 1,472 03-04-06 15:25 Build BUILD BAT 1,914 03-04-06 15:25 Build.bat 3 file(s) 5,977 bytes 0 dir(s) 13,718.80 MB free Build did exist. -- Dr Bean Management is doing things right; Leadership is doing the right things. --Peter Drucker |
|
From: Ron S. <ro...@sa...> - 2006-02-26 01:31:14
|
On Fri, 24 Feb 2006 21:27:30 -0500, Randy W. Sims wrote: Hi Randy > perl Build.PL > Build realclean > if exist Build.bat echo profanity WIn2K. I did a 'perl Build test' and then a 'perl Build realclean'. The= latter produced: C:\perl-modules\Module-Build>perl Build realclean Deleting pod2htmd.tmp Deleting pod2htmi.tmp Deleting blib Deleting _build Deleting Build ######################################## build_bat: 0 $VAR1 =3D 'ARGV'; $VAR2 =3D []; ######################################## Deleting Build.bat -- Cheers Ron Savage, ro...@sa... on 26/02/2006 http://savage.net.au/index.html Let the record show: Microsoft is not an Australian company |