DirDB-FTP

 view release on metacpan or  search on metacpan

FTP.pm  view on Meta::CPAN

			$key = ''
		#}elsif($key eq 'REF'){
		# 	return $ref->NEXTKEY();	# next
		#}elsif($key =~ m/^ARRAY){
		# 	return $ref->NEXTKEY();	# next
		}else{
			# per-container metadata does not
			# appear in iterations through data.
			return $ref->NEXTKEY();	# next
		}
	};
	wantarray or return $key;
	return @{[$key, $ref->FETCH($key)]};
   };
   
   sub DESTROY{
       # no warnings;
       delete $IteratorListings{$_[0]};
   };
 
};




1;
__END__

=head1 NAME

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

=head1 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;

=head1 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 C<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.

=head2 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. 


=head2 EXPORT

None by default.


=head1 AUTHOR

David Nicol, davidnicol@cpan.org

=head1 LICENSE

GPL

=head1 SEE ALSO

L<DirDB>

L<Net::FTP::blat>

GPL

=cut




( run in 1.371 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )