in reply to Translating Perl to C

I've tried this one some of my Perl scripts and came away with a bloated, unmaintainable mess. In looking through that mess (and that required a strong stomach, believe me), I see that it's still dependant upon Perl. Therefore, I can't help but wonder how efficient this C is compared to the equivalent Perl (mod perl may be a better comparison).

Replies are listed 'Best First'.
RE: Re: Translating Perl to C
by chromatic (Archbishop) on Jun 28, 2000 at 02:20 UTC
    B::CC is a little better. It produces slightly more idiomatic code.

    I wouldn't use it in a production environment, though. The only time I've ever compiled Perl was using perl2exe, and that was simply a one-shot filter application that had to be run on a completely different platform approximately once every three weeks.

    Most of these 'compilers' just produce a wrapper around a working Perl environment, anyway. How else would they handle eval()?

RE: Re: Translating Perl to C
by Adam (Vicar) on Jun 28, 2000 at 00:48 UTC
    This is because the perl to c conversion actually embeds the perl compiler with everything else, and then uses it to compile your perl script at runtime... all within one executable. It's sick but it works.