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

[MacPerl] Adventures with Net::FTP




On the basis of one download completed, I declare success and will
shortly turn in.  (The transfer actually didn't work, the end of the
text file was mangled, but the same mangling occured under stock
Net::FTP on the Sun.)  There is now a version of Net::FTP that works
under MacPerl (and tomorrow I'll see if the same file will work under
Unix). If anyone wants it, send me e-mail.  Limit yourself to binary
transfers, since there's something flakey about the text mode.

The usual things had to be changed.  I excised the netrc stuff, removed
the getpwuid in favor of $ENV{'USER'}, since he "use strict;" I clothed
all the barewords (MacPerl's syntax check really came in handy here),
\r\n got changed.  Only two things had to be changed because of the my
bug.

The hardest part was the fact that Socket 1.3, available in CPAN, is
written in a non-Perl language (guess which one?).  The rationale is
understandable, but I wish they had limited it to "get the numbers
right" rather than also writing several routines in C.  I had to cobble
together Perl versions of sockaddr_in, inet_aton, and inet_ntoa (not
very difficult, especially with GUSI.ph and 5.002's Socket.pm and
Socket.c available as guides), and stuff them in MacPerl's distributed
Socket.pm (and it its export list).
---
--------
Paul J. Schinder
NASA Goddard Space Flight Center,
Code 693, Greenbelt, MD 20771 USA
schinder@pjstoaster.pg.md.us