workaround for segfault; slightly poor form GraphML but who cares?
Tara L Andrews [Thu, 19 Apr 2012 23:14:17 +0000 (01:14 +0200)]
lib/Text/Tradition/Collation.pm
lib/Text/Tradition/Collation/RelationshipStore.pm

index e854128..3f62b11 100644 (file)
@@ -1080,8 +1080,8 @@ sub as_graphml {
        
        # Add the relationship graph to the XML
        map { delete $edge_data_keys{$_} } @path_attributes;
-       # $self->relations->_as_graphml( $graphml_ns, $root, \%node_hash, 
-       #       $node_data_keys{'id'}, \%edge_data_keys );
+       $self->relations->_as_graphml( $graphml_ns, $root, \%node_hash, 
+               $node_data_keys{'id'}, \%edge_data_keys );
 
     # Save and return the thing
     my $result = decode_utf8( $graphml->toString(1) );
index f2d3359..ddad4db 100644 (file)
@@ -614,7 +614,7 @@ sub _as_graphml {
     
     # Add the vertices according to their XML IDs
     my %rdg_lookup = ( reverse %$node_hash );
-    my @nlist = sort _by_xmlid keys( %rdg_lookup );
+    my @nlist = sort keys( %rdg_lookup );
     foreach my $n ( @nlist ) {
        my $n_el = $rgraph->addNewChild( $graphml_ns, 'node' );
        $n_el->setAttribute( 'id', $n );