Skip Menu |

This queue is for tickets about the GraphViz2 CPAN distribution.

Report information
The Basics
Id: 87560
Status: resolved
Priority: 0/
Queue: GraphViz2

People
Owner: Nobody in particular
Requestors: KENTNL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 2.16
Fixed in: 2.16



Subject: label => [] implies shape => record with no way to change it.

According to the docs ( https://metacpan.org/module/GraphViz2#Calling-new )

 

 global => { 
    record_shape => 'Mrecord'
 }

should emit rounded records, and rounded records should be the default option.

However, this is not what the code does, and regardless of what I seem to try, the DOT emitted always says:

"somenode" [ label="<port1> a|<port2> b|<port3> c" shape="record" ]

Which always renders as rectangular.

Even specifying the shape directly in ->add_node()  is totally ignored.

#!/usr/bin/env perl
use strict;
use warnings;
use utf8;

use GraphViz2;

my $g = GraphViz2->new(
    global => { record_shape => 'Mrecord' }
);

$g->add_node( name => 'somenode' , label => [ 'a', 'b' , 'c' ]);
$g->add_node( name => 'othernode' , label => [ 'a', 'b' , 'c' ], shape => 'Mrecord' );

$g->run( driver => 'dot', format => 'png', output_file => '/tmp/test.png' );
print $g->dot_input;
 

Fixed in V 2.17. In particular, see scripts/record.4.pl in the distro and on the demo page http://savage.net.au/Perl-modules/html/graphviz2/index.html