--- nfo/perl/libs/Data/Transfer/Sync/Map.pm 2003/05/13 08:10:11 1.1 +++ nfo/perl/libs/Data/Transfer/Sync/Map.pm 2004/05/11 20:04:40 1.2 @@ -1,5 +1,5 @@ ## ------------------------------------------------------------------------- -## $Id: Map.pm,v 1.1 2003/05/13 08:10:11 joko Exp $ +## $Id: Map.pm,v 1.2 2004/05/11 20:04:40 jonen Exp $ ## ## Copyright (c) 2002 Andreas Motl ## @@ -8,6 +8,9 @@ ## ## ------------------------------------------------------------------------- ## $Log: Map.pm,v $ +## Revision 1.2 2004/05/11 20:04:40 jonen +## bugfix[joko] related to emty hashrefs +## ## Revision 1.1 2003/05/13 08:10:11 joko ## initial commit, code from Metadata.pm ## @@ -112,15 +115,25 @@ # V2 - build callback map for helper function #print Dumper($self->{node}->{source}->{payload}); #my $cbmap = { $self->{meta}->{source}->{IdentProvider}->{arg} => $cb_dispatcher }; - my $cbmap = {}; + + # FIXED - 2004-05-11: providing an empty hashref to ref_slot seems to be a bad idea here.... + #my $cbmap = {}; + my $cbmap = undef; my $value = ref_slot($self->{node}->{source}->{payload}, $self->{node}->{source}->{propcache}->{property}, $cbmap); + # new of 2003-05-12: Assertion: assume ref_slot resolves to scalar. (no ref!) # Otherwise: Invalidate virtual object completely (skip sync). + # TODO: Warn to STDOUT or somewhere else here? + + #print "prop: ", $self->{node}->{source}->{propcache}->{property}, "\n"; #print "val: $value", "\n"; #if ($value =~ m/HASH/) { - # print Dumper($self->{node}->{source}->{payload}); + #print Dumper($value); + #print Dumper($self->{node}->{source}->{payload}); #} - return if ref $value; + #return if ref $value; + #next if ref $value; + $self->{node}->{source}->{propcache}->{value} = $value; }