--- nfo/perl/libs/Data/Transfer/Sync/Core.pm 2003/03/27 15:31:15 1.8 +++ nfo/perl/libs/Data/Transfer/Sync/Core.pm 2003/05/13 08:17:52 1.9 @@ -1,11 +1,16 @@ -## $Id: Core.pm,v 1.8 2003/03/27 15:31:15 joko Exp $ +## ------------------------------------------------------------------------- +## +## $Id: Core.pm,v 1.9 2003/05/13 08:17:52 joko Exp $ ## ## Copyright (c) 2002 Andreas Motl ## ## See COPYRIGHT section in pod text below for usage and distribution rights. ## -## ---------------------------------------------------------------------------------------- +## ------------------------------------------------------------------------- ## $Log: Core.pm,v $ +## Revision 1.9 2003/05/13 08:17:52 joko +## buildAttributeMap now propagates error +## ## Revision 1.8 2003/03/27 15:31:15 joko ## fixes to modules regarding new namespace(s) below Data::Mungle::* ## @@ -66,7 +71,7 @@ ## + minor cosmetics for logging ## ## Revision 1.2 2002/12/01 04:43:25 joko -## + mapping deatil entries may now be either an ARRAY or a HASH +## + mapping detail entries may now be either an ARRAY or a HASH ## + erase flag is used now (for export-operations) ## + expressions to refer to values inside deep nested structures ## - removed old mappingV2-code @@ -78,7 +83,7 @@ ## ## Revision 1.1 2002/10/10 03:44:21 cvsjoko ## + new -## ---------------------------------------------------------------------------------------- +## ------------------------------------------------------------------------- package Data::Transfer::Sync::Core; @@ -98,7 +103,7 @@ use Data::Mungle::Compare::Struct qw( getDifference isEmpty ); use Data::Storage::Container; use DesignPattern::Object; -use libdb qw( quotesql ); +use shortcuts::database qw( quotesql ); # get logger instance my $logger = Log::Dispatch::Config->instance; @@ -342,7 +347,6 @@ $tc->{skip}++; print "s" if $self->{verbose}; next; - } # first reaction on entry-status: continue with next entry if the current is already "in sync" @@ -352,8 +356,12 @@ } # build map to actually transfer the data from source to target - $self->buildAttributeMap(); - + if (!$self->buildAttributeMap()) { + #$logger->warning( __PACKAGE__ . "->_run: Attribute Map could not be created. Will not insert or modify node."); + $tc->{skip}++; + print "e" if $self->{verbose}; + next; + } # trace #print Dumper($self->{node}); exit;