NAME

DirDB::FTP - Perl extension to use a remote directory as a database

SYNOPSIS

  use DirDB::FTP;
  my $ftp = DirDB::FTP->new('some.host.name',$username,$password);
  tie my %entries, DirDB::FTP, $ftp, => "/blog_entries";
  $entries{'entry for '.localtime} = $entry_text;

DESCRIPTION

DirDB::FTP is a package that lets you access a DirDB hash on a remote machine, through the FTP server.

The semantics of DirDB (version 0.06) are followed, including directory locking and recursive memory loading on directory deletion.

Net::FTP is used for the connection, including the Net::FTP::blat extensions.

Most actions can be done with ftp method return values, but differentiating between directories and non=existent files is done by parsing the message for the phrase 'no such file' so if you are using DirDB::FTP against a FTP server that issues a different errore message when there is no such file, you will have to edit your copy of the module.

The underlying object is an array containing the Net::FTP connection object and the absolute path to the directory, modulo any chrooting the FTP server might do based on the provided credentials, of course.

Keys are names within the directory, values are the contents of the files.

A leading space is used as an escape character, the empty string as a key becomes ' EMPTY' just like in DirDB.

RISKS

"mkdir locking" is used to protect incomplete directories from being accessed while they are being written. It is conceivable that your program might catch a signal and die while inside a critical section.

EXPORT

None by default.

AUTHOR

David Nicol, davidnicol@cpan.org

LICENSE

GPL

SEE ALSO

DirDB

Net::FTP::blat

GPL