/[cvs]/nfo/perl/libs/Data/Mungle/Transform/Deep.pm
ViewVC logotype

Diff of /nfo/perl/libs/Data/Mungle/Transform/Deep.pm

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

revision 1.19 by jonen, Fri Mar 28 03:11:25 2003 UTC revision 1.20 by joko, Fri Apr 4 17:31:23 2003 UTC
# Line 2  Line 2 
2  ##  $Id$  ##  $Id$
3  ## ---------------------------------------------------------------------------  ## ---------------------------------------------------------------------------
4  ##  $Log$  ##  $Log$
5    ##  Revision 1.20  2003/04/04 17:31:23  joko
6    ##  minor update to 'childObj2string'
7    ##
8  ##  Revision 1.19  2003/03/28 03:11:25  jonen  ##  Revision 1.19  2003/03/28 03:11:25  jonen
9  ##  + bugfix  ##  + bugfix
10  ##  ##
# Line 491  sub deep_copy { Line 494  sub deep_copy {
494  }  }
495    
496    
497    # encodes object-references to serialized string representations
498    # made up of:
499    #   - 'o_<classname>_<ref type>_<guid>'???
500    #   - 'o_{guid}_{classname}'!!!
501  sub childObj2string {  sub childObj2string {
502    my $obj = shift;    my $obj = shift;
503    my $option = shift;    my $option = shift;
504    my $classname = ref $obj;    my $string = 'n/a';
505    my $string;    
506      if ($option == 1) {
507        if ((my $classname = ref $obj) && (my $guid = $obj->{guid})) {
508          $string = join('_', 'o', $guid, $classname);
509        }  
510      }
511        
   if($option == 1) {  
     $string = "o_" . $obj->{guid} . "_" . $classname;  
   }    
512    return $string;    return $string;
513  }  }
514    

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

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