develooper Front page | perl.perl5.porters | Postings from January 2006

Re: Help with a build error

Thread Previous | Thread Next
January 25, 2006 00:33
Re: Help with a build error
Message ID:
On 12/5/05, Randy W. Sims <> wrote:
> demerphq wrote:

(Regarding the problem of perl based installers not being able to
install on WIn32  any file that the perl process itself has open
during the build process. Such as .dll's and modules with unclosed
__END__ or __DATA__ sections.)

> > Ill see what I can do as time permits. But id like to see this problem
> > fixed too so ill try to make some time.
> Thanks for talking through these issues and any other help you may be
> able to offer.

Ive started looking into this issue again because of

I have MB 0.27_04 patched so that it creates a batch file from the
Build script, one which is deletable via realclean.

I started looking into handling the installation issue but it looks
like this requires changes to ExtUtils::Install.

I also contemplated how this issue would impact CPAN.

Currently im thining the following:

1. E::I::install() doesnt bother to check to see if the copy command
was successful.
2. For win32 (and maybe everything) install() should keep a list of
files that failed copy.
3. install() should return the list of failures
4. M::B or EU::MM need to be able to capture this failure and on win32
translate it into a batch file containing the copy commands.
5. CPAN(PLUS)? needs to be able to receive feedback from the install
framework (either) that the install failed, in which case it needs to
terminate and launch the batch file.
6. The batchfile should be smart enough that it relaunches the
CPAN(PLUS) enviornment.

The idea i have currently for M::B is that when install fails it
writes a batchfile called


(Substitute .exe for either .bat on pre NT machines or .cmd on NT machines).

The build_followup.ext would do the copies using standard Win32 copy
commands. It would then relaunch the Build script, but with a flag
that indicates "Post followup". The post followup action would verify
that the copy was successful and then delete the build_followup.exe

Where things get tricky is when you are using CPAN(PLUS) to do this.
How does the install framework inform CPAN(PLUS) that the install can
only happen once CPAN has terminated? And how would CPAN(PLUS) restart
properly? IE, what happens if it is installing as part of the 'follow'

Anyway, even if CPAN(PLUS) is not updated, at least M::B could be used
as EU::MM can be used, that is outside of CPAN to correctly install a
file that CPAN or MB might have locked.

Also, something that would be really useful would be a way to force
perl to close all files. Ie, to unload all dll's, close any intenral
filehandles kept open for __DATA__ and __END__ etc. Then this batch
file malarky would be totally unnecessary.

ps: I have patches but they are fairly minimal at this point. Id
prefer to send them through once they are a bit more comprehensive.

perl -Mre=debug -e "/just|another|perl|hacker/"

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About