This is the mail archive of the cygwin-talk mailing list for the cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Wish Setup would accept my Perl


On 07 November 2007 19:56, LDR wrote:

> The advantages of using AS Perl, as I see it:
> 
> * It's easier to package an app for use by others who may or may not
>   be using Cygwin, or even Windows. (In fact, that's the major
>   reason that I would do any app in Perl-only, anyways. AS perl
>   just makes the app span Windows w/o Cygwin.)

  Mingw perl? 


  ;-)

 
> * Better debugger.
> 
> In fact, I'm in the process of rewriting an app that I had previously
> written (evolved!) in Bash, awk, sed ... with some Perl routines.

  Heh, how can you tell the difference?  Perl basically IS the shell, plus awk
and sed, all wrapped up into a kind-of-a-language lucky dip/grabbag/jumble
sale.

 I'm fairly sure the first version of perl looked something like ...


$ cat perl.sh

#!/bin/bash
# Perl v0.0.1
# (c) Larry Wall aged 17+3/4
TMPFILE=`mktemp`
CC=`which gcc`
cat >${TMPFILE} <<EOT

/* Compiled by perl-0.0.1 */
#include <stdlib.h>
#include <stdio.h>

int main () {
EOT
while read x ;
do
    echo >> ${TMPFILE} "    system (\"sh -c \'${x:-:}\'\"); " ;
done
cat >>${TMPFILE} <<EOT
    return 0;
}
EOT
${CC} -x c ${TMPFILE} -o ${TMPFILE}.pm
chmod a+x ${TMPFILE}.pm
exec ${TMPFILE}.pm
rm ${TMPFILE} ${TMPFILE}.pm



  In version 0.0.2, he added '-g' to the $(CC) line.  For better debugging.

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]