--- Graph/Writer/Dot.pm_original Fri Jun 14 01:54:05 2002 +++ Graph/Writer/Dot.pm Mon Nov 15 10:31:35 2004 @@ -68,13 +68,15 @@ my %attributes; my @keys; + my $arrow = ($graph->directed) ? '->' : '--'; + my $gname = ($graph->directed) ? 'digraph' : 'graph'; #------------------------------------------------------------------- # If the graph has a 'name' attribute, then we use that for the # name of the digraph instance. Else it's just 'g'. #------------------------------------------------------------------- $gn = $graph->has_attribute('name') ? $graph->get_attribute('name') : 'g'; - print $FILE "digraph $gn\n{\n"; + print $FILE "$gname $gn\n{\n"; #------------------------------------------------------------------- # Dump out any overall attributes of the graph @@ -114,7 +116,7 @@ while (@edges > 0) { ($from, $to) = splice(@edges, 0, 2); - print $FILE " $from -> $to"; + print $FILE " $from $arrow $to"; %attributes = $graph->get_attributes($from, $to); @keys = grep(exists $attributes{$_}, @{$valid_attributes{'edge'}}); if (@keys > 0)