| 4 |
## $Id$ |
## $Id$ |
| 5 |
## -------------------------------------------------------------------------------- |
## -------------------------------------------------------------------------------- |
| 6 |
## $Log$ |
## $Log$ |
| 7 |
|
## Revision 1.6 2004/06/19 01:49:07 joko |
| 8 |
|
## enabled verbosing with Data::Transfer::Sync |
| 9 |
|
## minor patch to option processing |
| 10 |
|
## |
| 11 |
|
## Revision 1.5 2003/02/22 16:53:42 joko |
| 12 |
|
## minor update: debugging |
| 13 |
|
## |
| 14 |
## Revision 1.4 2003/02/20 21:11:15 joko |
## Revision 1.4 2003/02/20 21:11:15 joko |
| 15 |
## renamed module |
## renamed module |
| 16 |
## modified runtime namespace hierarchy |
## modified runtime namespace hierarchy |
| 137 |
$self->_before_run(); |
$self->_before_run(); |
| 138 |
$self->prepare(); |
$self->prepare(); |
| 139 |
#$self->tellWhatIAmDoing(); |
#$self->tellWhatIAmDoing(); |
| 140 |
|
#$self->_tellWhatIWillDo(); |
| 141 |
$self->sync(); |
$self->sync(); |
| 142 |
} |
} |
| 143 |
|
|
| 144 |
sub prepare { |
sub prepare { |
| 145 |
my $self = shift; |
my $self = shift; |
| 146 |
|
|
| 147 |
|
#print Dumper($self->{opt}); |
| 148 |
|
#exit; |
| 149 |
|
|
| 150 |
# TODO: |
# TODO: |
| 151 |
# - move this to Data::Transfer::Sync::checkOptions!!! |
# - move this to Data::Transfer::Sync::checkOptions!!! |
| 152 |
# - use 'syncable'??? |
# - use 'syncable'??? |
| 153 |
|
|
| 154 |
#if ($self->{app}->{config}->{databases}->{$self->{opt}->{target}}->{syncable}) { |
#if ($self->{app}->{config}->{databases}->{$self->{opt}->{target}}->{syncable}) { |
| 155 |
|
$self->{opt}->{action} ||= ''; |
| 156 |
|
|
| 157 |
my $mode = ''; |
my $mode = ''; |
| 158 |
my $erase = 0; |
my $erase = 0; |
| 188 |
# is api-version specified? |
# is api-version specified? |
| 189 |
my $sync_version = $self->{opt}->{sv}; |
my $sync_version = $self->{opt}->{sv}; |
| 190 |
$sync_version ||= 'V1'; |
$sync_version ||= 'V1'; |
| 191 |
|
#$sync_version = 'V2'; |
| 192 |
|
|
| 193 |
|
#print "version: $sync_version", "\n"; |
| 194 |
|
|
| 195 |
# create a new synchronization object |
# create a new synchronization object |
| 196 |
my $sync = Data::Transfer::Sync->new( 'sync_version' => $sync_version, __parent => $self ); |
my $sync = Data::Transfer::Sync->new( 'sync_version' => $sync_version, __parent => $self, verbose => 1 ); |
| 197 |
|
|
| 198 |
# trace |
# trace |
| 199 |
#print Dumper($self); |
#print Dumper($self); |