Skip Menu |

This queue is for tickets about the GraphViz CPAN distribution.

Report information
The Basics
Id: 28032
Status: resolved
Priority: 0/
Queue: GraphViz

People
Owner: Nobody in particular
Requestors: adrianissott [...] hotmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.02
Fixed in: (no value)



Subject: Doesn't handle dot keywords as node names
Hi, In the attached file is show_graphviz_pm_bug.pl which shows an example of the problem. Basically GraphViz.pm doesn't treat dot keywords such as 'node' and 'edge' as special cases. By not doing so these nodes don't make it into the graph diagram and cause dot to give warnings (see the before and after files in the .zip attached). Since there's already a special case for graph as a node name why not add the other key words too? Here's a fix that I've found to work: Show quoted text
> my $GRAPHVIZ_KEYWORD = qr/^(strict|node|edge|graph|digraph|subgraph)$/o;
sub _quote_name { my($self, $name) = @_; my $realname = $name; return $self->{_QUOTE_NAME_CACHE}->{$name} if $name && exists $self->{_QUOTE_NAME_CACHE}->{$name}; < if (defined $name && $name =~ /^[a-zA-Z]\w*$/ && $name ne "graph") { Show quoted text
> if (defined $name && $name =~ /^[a-zA-Z]\w*$/ && $name !~
$GRAPHVIZ_KEYWORD) { Regards, Adrian
Subject: GraphViz Bug.zip
This issue is fixed in GraphViz2 V 1.00. There won't be any more development on GraphViz.