At  4PM +0200 on 18/05/09 you (Konovalov, Vadim (Vadim)** CTR **) wrote:
> Hi Ben, 
> 
> > From: Ben Morrow [mailto:b...@morrow.me.uk] 
> >       To be useful, this would need to be a 'Portable'-type perl. It
> >       would also need to be able to work from a directory 
> > with spaces in
> >       its name. My intention was to start by unpicking the Perl::Dist
> >       stuff to understand how it works, and then work out what is
> >       currently possible and what isn't. 
> 
> From what you've already wrote, I see you're targeting Win32.
> 
> Currently, perl on Win32 is already moveable - you can copy installed
> Perl into any directory, even with spaces within directory names, and
> it will run scripts just fine.

My understanding was that not everything worked quite right, hence the
need for Adam's Portable Perl project. If it's only things like
MakeMaker (which doesn't matter to end-users) that are broken, then
that's less work for me :).

> >     - to extend pl2exe to allow it to create statically-linked
> >       executables. My idea was to get around the dll-loading 
> > problem by
> >       building all the needed extensions statically, then including a
> >       zip of the Perl code on the end of the exe the way PAR currently
> >       does. It's easy to read Perl from there without unpacking it,
> >       using PerlIO::subfile and the code from ex::lib::zip, 
> > though there
> >       are issues with taint mode.
> 
> building extensions statically is mostly done, some bits of it were
> done back then in 5.6.0-pre era, but they were not finished. They are
> still not fully finished, although I did some touches in this.

AFAICT building core extensions statically works OK, though there is the
annoying issue of statically-linked perls not being able to use
DynaLoader. I need to do some investigation into why that should be, as
I'm certain the underlying LoadLibrary call works just fine. I suspect
it has something to do with (the usual Win32 problem of)
different versions of libc getting loaded at the same time, but I don't
know.

There was a bug in EU::Miniperl that would have prevented static
extensions from linking. There may be more bugs here, since clearly
noone's used it for a while, but I'll see when I get there.

> All in all, this is p5p discussion - surely you will be warmly
> welcomed there with discussions on static linking on Win32 :)

Certainly, if I find anything that can be fixed in core perl I'll take
it to p5p.

> All you're doing is very useful, I hope you'll think of non-win32
> platforms also :)

My intention is for this to be platform-independant (I'm actually doing
most of the development on FreeBSD), but I expect it will be most useful
on Win32. I believe even MacOS understands about text executables
nowadays, and if you put a perl script in the right magic place in a
directory with the right magic bit set, it runs just like any other
MacOS application.

Ben

Reply via email to