From: Tara L Andrews Date: Thu, 19 Apr 2012 23:14:17 +0000 (+0200) Subject: workaround for segfault; slightly poor form GraphML but who cares? X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=826d8773c081da08f139d1e48fa5ca1abb725f8e;p=scpubgit%2Fstemmatology.git workaround for segfault; slightly poor form GraphML but who cares? --- diff --git a/lib/Text/Tradition/Collation.pm b/lib/Text/Tradition/Collation.pm index e854128..3f62b11 100644 --- a/lib/Text/Tradition/Collation.pm +++ b/lib/Text/Tradition/Collation.pm @@ -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) ); diff --git a/lib/Text/Tradition/Collation/RelationshipStore.pm b/lib/Text/Tradition/Collation/RelationshipStore.pm index f2d3359..ddad4db 100644 --- a/lib/Text/Tradition/Collation/RelationshipStore.pm +++ b/lib/Text/Tradition/Collation/RelationshipStore.pm @@ -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 );