Re: [Module::Build] Does ./Build work on Windows?
Status: Beta
Brought to you by:
kwilliams
|
From: Ken W. <ke...@ma...> - 2006-02-16 04:30:49
|
Okay, I'm about to commit this patch. I had some trouble applying it because there seemed to have been some whitespace differences, not that I could actually find them, so I applied by hand. You might want to look at it after I applied to make sure it works properly. -Ken On Jan 30, 2006, at 3:11 AM, demerphq wrote: > The change required to MB to handle this is minimal and is implemented > in a provisional form in the attached patch. > > When the Build script is created it needs to add the line > > close *DATA unless eof(*DATA); > > when being used on win32. Then the exception line in pl2script needs > to be removed. > > Additionally when scripts are pl2bat'ed their bat names need to be > added to the cleanup list. This currently doesnt happen at all so MB > cant/doesnt clean up pl2batted files properly. (It may do so > indirectly as a directory cleanup but this doesnt help the build > script itself.) > > Also, my preference (and i think the preference of many in the windows > world) is to avoid ".bat" files on NT and latter Win32 OS'es. It > should use the .cmd extension when on NT, W2K and XP or later. I > hazzily recall there is a good reason for this, but i have to admit I > dont remember what it is. Maybe its just cargo cultism and doesnt > matter at all. Anyway, the point is the attached patch includes such > logic. :-) I based it the behaviour change on the presence of .CMD in > the PATHEXT enviornment var so on machines without either it will > default to .bat > > Im sorry i havent gotten further on this, i was distracted by other > things. > > BTW, there is one annoying thing about self deletion of the .cmd/.bat > Build file. When control returns to the shell it raises a warning > about the batch file unexpected ending. Its not an issue, but it is > inelegant so figuring out how to make it go away would be nice. > > Er, also, it might be worth just replacing the pl2bat behaviour with > the creation of a generic Build.cmd that just contained the logic to > launch perl Build. Then it wouldnt need to be cleaned up, and avoid > the other little issues involved. > > Cheers, > yves > > -- > perl -Mre=debug -e "/just|another|perl|hacker/" > <mb.patch> |