NAME

Tk::Mirror - Perl extension for a graphic user interface to update local or remote directories in both directions

SYNOPSIS

# in the simplest kind and manner

use Tk::Mirror;
use Tk;
my $mw->MainWindow->new();
$mw->Mirror()->grid();
MainLoop();

# in a detailed kind

 use Tk;
 use Tk::Mirror;
 my $mw = MainWindow->new();
 my $mirror = $mw->Mirror(
	-localdir		=> "TestA",
	-remotedir	=> "TestD",
	-usr		=> 'my_ftp@username.de'
	-ftpserver	=> "ftp.server.de",
	-pass		=> "my_password",
 	-debug		=> 1,
 	-delete		=> "enable",
 	-exclusions	=> ["private.txt", "secret.txt"],
 	-timeout		=> 60,
 	-connection	=> undef, # or a connection  to a ftp-server 
 	)->grid();
 for(keys(%{$mirror->GetChilds()}))
 	{
	$mirror->Subwidget($_)->configure(
 		-font	=> "{Times New Roman} 14 {bold}",
 		);
 	}
 for(qw/
 	TreeLocalDir
 	TreeRemoteDir
 	/)
 	{
 	$mirror->Subwidget($_)->configure(
 		-background	=> "#FFFFFF",
 		-width		=> 40,
 		-height		=> 20,
 		);
 	}
 for(qw/
 	bEntryUsr
 	EntryPass
 	bEntryFtpServer
 	bEntryLocalDir
 	bEntryRemoteDir
 	/)
 	{
 	$mirror->Subwidget($_)->configure(
 		-background	=> "#FFFFFF",
 		);
 	}
 MainLoop();
 

DESCRIPTION

This is a graphic user interface to compare and update local with remote directories in both directions.

CONSTRUCTOR and INITIALIZATION

(widget-Mirror-object) MainWindow-object->Mirror (options)
ftpserver the hostname of the ftp-server
usr the username for authentification
pass password for authentification
localdir local directory selecting information from, default '.'
remotedir remote location selecting information from, default '/'
debug set it true for more information about the ftp-process, default 1
timeout the timeout for the ftp-serverconnection
delete set this to "enable" to allow the deletion of files, default "disabled"
connection takes a Net::FTP-object you should not use that, default undef
exclusions a reference to a list of strings interpreted as regular-expressios ("regex") matching to something in the local pathnames, you do not want to list, default empty list [ ]

METHODS

(ref_h_all_childs) mirror-object->GetChilds (void) returns a hash of all childs used in the put-together widget, on you can call the "configure" function.
KEYS			VALUES
"LabelUsr"		=> $label_usr,
"bEntryUsr"		=> $m->{bentry_usr},
"LabelFtpServer"		=> $label_ftpserver,
"bEntryFtpServer"	=> $m->{bentry_ftpserver},
"LabelPass"		=> $label_pass,
"EntryPass"		=> $m->{entry_pass},
"LabelLocalDir"		=> $label_local_dir,
"LabelRemoteDir"		=> $label_remote_dir,
"bEntryLocalDir"		=> $m->{bentry_local_dir},
"bEntryRemoteDir"	=> $m->{bentry_remote_dir},
"TreeLocalDir"		=> $m->{tree_local_dir},
"TreeRemoteDir"		=> $m->{tree_remote_dir},
"ButtonUpdateUp"	=> $m->{button_update_up},
"ButtonCompare"		=> $m->{button_compare},
"ButtonUpdateDown"	=> $m->{button_update_down},
(ref_of_child) mirror-object->Subwidget(above shown key) returns a reference of a child widget you can call the configure method

EXPORT

None by default.

SEE ALSO

Tk
Net::MirrorDir
Net::UploadMirror
Net::DownloadMirror
http://www.planet-interkom.de/t.knorr/index.html

BUGS

Maybe you'll find some. Let me know.

AUTHOR

Torsten Knorr, <knorrcpan@tiscali.de>

COPYRIGHT AND LICENSE

Copyright (C) 2006 by Torsten Knorr

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.9.2 or, at your option, any later version of Perl 5 you may have available.

5 POD Errors

The following errors were encountered while parsing the POD:

Around line 29:

Unknown directive: =head

Around line 691:

'=item' outside of any '=over'

Around line 725:

You forgot a '=back' before '=head2'

Around line 727:

'=item' outside of any '=over'

Around line 752:

You forgot a '=back' before '=head2'