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 |
## |
## |
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 |
|
|