Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Wednesday September 22, 2004
09:25 AM

GraphViz::Data::Structure

[ #21001 ]
Two new versions in two days. Thanks to Devel::Cover pointing out where I hadn't tested adequately, I was able to find a number of bugs that my first set of tests missed.

The new version seems to work fine on OS X and on Linux, but there were some odd errors on Solaris. Anyone have a Solaris machine they'd be willing to try it out on and see if they can point out the bug?

Update: It's a bug in the 2.0 version of GraphViz itself; I'm still running with version 1.8, which doesn't have the bug. Patch appended for your dining and dancing pleasure:

--- /usr/local/lib/perl5/site_perl/5.8.3/GraphViz.pm    Wed Sep 22 15:56:22 2004
+++ GraphViz.pm Wed Sep 22 15:55:46 2004
@@ -408,7 +408,7 @@
       $node->{label} = $node->{name};
     }
   } else {
-    $node->{label} =~ s#([|<>\[\]{}"])#\\$1#g;
+   $node->{label} =~ s#([|<>\[\]{}"])#\\$1#g unless $node->{shape} eq 'record';
   }

   delete $node->{cluster}

The patch turns off the newly-added escaping of characters that dot treats as special. Since record shapes need these special characters, escapling them gives you nice oval nodes with names like <port1>1|<port2>2, and of course edges that are supposed to hook to those ports can't find them.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.