/[cvs]/nfo/perl/libs/Data/Mungle/Code/Ref.pm
ViewVC logotype

Diff of /nfo/perl/libs/Data/Mungle/Code/Ref.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by joko, Thu Mar 27 15:31:03 2003 UTC revision 1.6 by joko, Tue May 13 07:02:47 2003 UTC
# Line 2  Line 2 
2  ##  $Id$  ##  $Id$
3  ## ---------------------------------------------------------------------------  ## ---------------------------------------------------------------------------
4  ##  $Log$  ##  $Log$
5    ##  Revision 1.6  2003/05/13 07:02:47  joko
6    ##  fix: check for definedness, not for trueness
7    ##
8  ##  Revision 1.5  2003/03/27 15:31:03  joko  ##  Revision 1.5  2003/03/27 15:31:03  joko
9  ##  fixes to modules regarding new namespace(s) below Data::Mungle::*  ##  fixes to modules regarding new namespace(s) below Data::Mungle::*
10  ##  ##
# Line 101  sub ref_slot { Line 104  sub ref_slot {
104            
105      # if value isn't set, try to set it      # if value isn't set, try to set it
106      my $callbackMap;      my $callbackMap;
107      if ($values) {      # fix (2003-04-17): always do fill if value is *defined*!!!
108        if (defined $values) {
109        #if (ref $values eq 'HASH') {        #if (ref $values eq 'HASH') {
110        if (ref $values eq 'Data::Map') {        if (ref $values eq 'Data::Map') {
111          $callbackMap = $values->getAttributes();          $callbackMap = $values->getAttributes();
112        } else {        } else {
113          # apply $values as single value to referenced slot          # apply $values as single value to referenced slot
114          #print "APPLY!", "\n";          #print "APPLY!", "\n";
115          eval('$obj' . '->' . $objPerlRefString . ' = $values;');          my $evalstr = '$obj' . '->' . $objPerlRefString . ' = $values;';
116            #print "eval: $evalstr", "\n";
117            eval($evalstr);
118          die ($@) if $@;          die ($@) if $@;
119        }        }
120      }      }

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed