Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

runrig (3385)

runrig
  dougwNO@SPAMcpan.org

Just another perl hacker somewhere near Disneyland

I have this homenode [perlmonks.org] of little consequence on Perl Monks [perlmonks.org] that you probably have no interest in whatsoever.

I also have some modules [cpan.org] on CPAN [cpan.org] some of which are marginally [cpan.org] more [cpan.org] useful [cpan.org] than others.

Journal of runrig (3385)

Wednesday March 30, 2005
11:58 AM

Tk and FTP

[ #23930 ]

I needed a file select dialog, which there are plenty of in Tk, but needed to select via FTP. I had a crude solution hacked together using an HList, but then noticed Tk::RemoteFileSelect. Cool! Except that T::RFS requires you to log in to the FTP server to select the file, but the user/password are not persistent so you have to make the user log in again to get or put the file. As a quickie solution, I added a couple of global variables to the package, which get set when the ftp connection is made, then they are available after the dialog returns. A cleaner solution might be to add -(ftp|user|password)variable => \$variable options to the constructor, and an email is off to the author to see if he's open to that.

Before finding out about T::RFS, I was leaning toward making a generic RFS, which didn't necessarily rely on FTP, but had generic get_files and change_directory type functions that you could maybe pass in, but now I'm not so inclined since, as they say in Go Fish, 'I got what I wanted' :)

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.