[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl-WebCGI] Okey..what next?



At 11:08 AM -0600 3/20/00, David Steffen wrote:
>Justin Shore asked:
>
>>I had no idea that I had to convert all my perl scripts to 
>>Mac-style linebreaks before they'd work.  I was wondering what was 
>>up with them; they worked perfectly on my production machines 
>>(Linux).  Is there any way around the linebreak problem?  That's 
>>pretty damn annoying.  The whole reason behind installing MacPerl 
>>for me was so that I could test my scripts wo/ having to disturb my 
>>productions machines
>
>I'd like to respond but I'm not quite sure I understand the issue.
>
>If you use FTP to transfer files to and from your production 
>machine, and if you transfer them as text, the line ends will be 
>converted automatically.

That depends on what FTP client you use.  Fetch has that option. 
Transmit doesn't.  Unfortunately I use Transmit due to a small (but 
pain in the ass) bug that Fetch encounters every so often with 
ProFTPd and Wu-FTPd (the problem is with Fetch from what I 
understand).

>Could you describe how you are working that this is a problem?

I build all my perl scripts on my Mac with BBEdit.  I save all my 
scripts with Unix-style linebreaks (the reason will be aparent 
further down).  I make all the changes directly from my Mac and 
upload a fresh copy of the script to a particular Linux box.  The 
script is run from within MRTG (can also be run by hand for testing). 
Every-so-often I get paged and have to fix something without the aide 
of my Mac and BBEdit.  No biggie really.  I just find a computer and 
ssh to a given box and fix the problem from there.  If I don't save 
those scripts with Unix-style linebreaks, I'm in a world of hurt when 
it comes to fixing it remotely from within Linux.  The reason I 
installed MacPerl is to test my scripts before I upload.  A couple of 
the Linux boxes are under a rather high load which makes using them 
difficult; hence the need for using MacPerl.  Maintaining multiple 
copies of the scripts, w/ Mac-style linebreaks and w/ Unix-style 
linebreaks, (about 250) is a bit of a pain.  I did have LinuxPPC 
installed but had to remove it during a disk failure.  If I still had 
that I'd just run it and MOL and test it that way.  I'm rather 
surprised that MacPerl doesn't allow for Unix-style linebreaks 
(Windows understandably but Unix?).  It would be a simple enough 
thing to implement and would make it more functional in the end. 
That is one of the main reasons I use BBEdit; because it can save 
with Unix-style linebreaks.  I suppose one could build wrapper for 
MacPerl to convert the script on the fly in memory.  That would be a 
bit of a pain though.  The method of running the script from BBEdit 
is fine except it doesn't seem to work with STDIN at all.  There's 
probably another solution that I haven't seen yet.  Anyhow, that's 
how I basically work and why its a problem for me.  Thanks for the 
reply.

Justin
-- 

--
Justin Shore       K-State Linux Distro Mirror, Sysadmin
macdaddy@vinnie.ksu.ksu.edu
<http://vinnie.ksu.ksu.edu/mirror/rpm2html>
<ftp://vinnie.ksu.ksu.edu/pub/mirror/linux>

*Internet2 Users*
<ftp://quest.ksu.ksu.edu/pub/mirror/linux>

==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-webcgi-request@macperl.org