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

[MacPerl] macftp.pl routines and Net::FTP installation



I wanted to ftp some files in perl, however the particular ftp server I use 
needs you to log in as anonymous, then issue the acct, user, pass commands 
(these are at the end of this message to be possibly pasted into your own 
macftp.pl, or more hopefully in the main distribution).  This was after 
spending some time trying to get the Net::FTP module working which resulted in 
these questions which I am curious about:

1. Has anyone used Net::FTP module under macperl?
2. Is there a anything more to installing modules in macperl other than 
ensuring they are in the proper place in the lib directory?  (other than system 
dependant functions)  In order to "use Net::FTP;" (but I never did use it ;-) I 
had to make several changes such as removing a "use strict;" (to disable 
barewords warnings) and remove the version after some other "use [xx] 
[version];" statements.  Even when it successfully "used", when I called some 
of its functions, various internal variables of the module seemed to be out of 
scope within the module.  This leads me to think that I did something bad to 
the module when installing it.  At this point I had to go back to do some real 
work, and gave up on this module.
3. Is there something wrong with macperl in executing large scripts?  I 
attempted to use makemaker to do what I understand to be a "proper" 
installation of Net::FTP, but even after resaving following the "this script is 
to large to be edited by macperl" message, the makemaker script did not run.

Tim Andvaag (andvaagts@stentor.ca)

# my extra ftp commands for macftp.pl
#######################################################
#  Send acct
sub acct { ## Public
    &do_ftp_cmd(200, "acct", @_); 
}
#######################################################
#  Send user
sub user { ## Public
    &do_ftp_cmd(331, "user", @_); 
}
#######################################################
#  Send pass
sub pass { ## Public
    &do_ftp_cmd(200, "pass", @_); 
}