perl in OSX

philbert

Registered
Hi all,

I write perl scripts, and my development cycle is to make an edit, upload
to a remote unix server, test, and then repeat.

It's dawning on me I could probably run a web server on my OSX mac, and thus test my scripts on my own machine.

But I have no clue how to set this up.

My only goal here is to be able to skip the "upload to remote server to test script" part of my programming routine.

Many thanks on any suggestions regarding how I might learn this.
 
See http://www.cgi101.com/book/connect/mac.html for configuation information.

Just for clarity... what sort of scripts are you writing for your remote host? There may be important differences between the build of apache on your host and the apache on your Mac.

If you are using your remote host for debugging, why not try using ssh to edit your scripts directly (if you can stomach editing in a terminal window). I do this precisely because I can't stand uploading either. Or perhaps edit in TextWrangler, which allows you to get and put files directly through its own built-in ftp client. Just some ideas....
 
Andrew Adamson said:

Ah, many thanks Andrew, this URL looks like the perfect starting place. Appreciate it.

Andrew Adamson said:
Just for clarity... what sort of scripts are you writing for your remote host? There may be important differences between the build of apache on your host and the apache on your Mac.

Good point, hadn't thought of that. To be brief, basically most of my scripts are based on reading and writing in/out of text file databases.

Andrew Adamson said:
If you are using your remote host for debugging, why not try using ssh to edit your scripts directly (if you can stomach editing in a terminal window).

Oh my, no can do. :) I spend way too much time editing to spend my life in the terminal window...

Andrew Adamson said:
I do this precisely because I can't stand uploading either. Or perhaps edit in TextWrangler, which allows you to get and put files directly through its own built-in ftp client. Just some ideas....

Ah, another great idea. I just discovered TW a couple months ago, and love it. I hadn't explored the built-in FTP, will do so now.

You know how you can locally edit an HTML file? You make a change, refresh your browser, and see the results. Ideally, that's where I'd hope to wind up eventually. It would probably give me an hour a day of new productivity.

Thanks again, great tips!

Phil
 
The only beef I have with TextWrangler's FTP functions is that the program seems unwilling to remember which directory a remote file comes from. If all your perl is in ./cgi-bin, this is not an issue. But when I am working on files from different directories, I am CONSTANTLY hitting save and leaving the file in the wrong directory. I've ended up polluting all my working directories out of my sloppiness. So now I work almost exclusively in a remote emacs session. Ho hum.
 
Hmm, this isn't going to be point and click easy, is it?

This tutorial: http://www.cgi101.com/book/connect/mac.html
says to edit this file: /etc/httpd/httpd.conf

I've tried searching for that file many different ways, no such file found.

I did find the Apache manual shipped with my system, and most
of the links on the home page of the manual are broken, even
though they are to local files.

Maybe Apple could hire somebody who knows how to code HTML links,
that would really cool cutting edge, eh?

Now I remember why I started buying Macs a decade ago. So I could do Unix
command line stuff! Yea, that's it. :)

Sigh...
 
Back
Top