develooper Front page | perl.perl5.porters | Postings from March 2000

Re: What's left to do? [LONG]

From:
Tom Hughes
Date:
March 22, 2000 15:49
Subject:
Re: What's left to do? [LONG]
Message ID:
61df80a349.tom@compton.compton.nu
In message <20000322155800$0c7d@gosford.compton.nu>
          Tom Christiansen <tchrist@chthon.perl.com> wrote:

> ># Auto-produce executable.
>
> >Don't understand. Isn't this what perlcc does, or do we want to
> >produce true executables from bytecode? I still can't get
> >     perlcc -b -o hello -e 'print qq/Hello world\n/'
> >to do anything interesting.
>
> Really?  It works for me.

[ snipped example ]

> But that long message is insane.  Utilities shouldn't be spitting out
> all those horizontal rules.  In fact, it shouldn't say anything at all
> if it works.

All true. That output predates bytecode support in perlcc though
so I deny all responsibility ;-) Anyony have any objections to me
providing a patch to remove the verbosity? or at least require a
switch to turn it on...

>              And it shouldn't forget to turn on the execute bit.

It isn't supposed to. There is code in there to turn it on but it
obviously hasn't triggered in this case. I think perlcc must have
decided you were compiling a module rather than a script as it only
turns on the x bits for scripts.

> It's still huge, though.
>
>     % ls -l hello
>     -rwxr-xr-x  1 tchrist  wheel  161127 Mar 22 05:56 hello

Which rather goes to the heart of the problems that I see with the
byteloader and indeed with the compiler in general.

I believe the size problems are related to it having a very hard
time deciding which modules are actually needed by the script and
which were needed by the compiler which all comes back to the fact
that perl 5 was not designed with the current compilation system
in mind and the current retrofit system is a bit scary and highly
fragile.

> And someone peculiar:
>
>     % file hello
>     hello: perl commands text
>
> Because of this:
>
>     % cat -v hello  | head
>     #!/usr/local/bin/perl
>     use ByteLoader 0.03;
>     ^F

This is the way people seemed to think it should be done. Short of
hacking /etc/magic I don't see what we can do to avoid it given the
current ByteLoader implementation.

> ># perfect a Perl version of expect
>
> >Work with IO::Tty and put these in core replacing Comm.pl
> >Is this really what we want/need?
>
> There's an Expect.pm you know.

It has a truly horrid interface though.

Tom

-- 
Tom Hughes (tom@compton.nu)
http://www.compton.nu/
...A clean disk is the sign of a warped drive.




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About