Subject: | Topology->from_graph not vertex05 compatible |
Hi,
I've started using Graph::Layout::Aesthetic to extend my script using Graph-0.59 and when I try to load in the existing Graph with 'from_graph' in Topology.pm I get the following;
set_attribute: not a compat02 graph at /usr/lib/perl5/site_perl/5.8/Graph.pm line 2307.
I had a look at the from_graph code and if you replace the following lines
if (defined($attribute)) {
$graph->set_attribute($attribute, $_, $num->{$_} = $nr++) for $graph->vertices;
} else {
with these lines is now works.
if (defined($attribute)) {
if ( $graph->is_compat02 ) {
$graph->set_attribute($attribute, $_, $num->{$_} = $nr++) for $graph->vertices;
} else {
$graph->set_vertex_attribute($attribute, $_, $num->{$_} = $nr++) for $graph->vertices;
}
} else {
Regards Paul.