use strict; use warnings; use GraphViz; use GraphViz::Data::Grapher; my %othergraphvizopts = ( compress => 1 ); my $structure = [ 'a', 'b', 'c', { hi => 'there' } ]; my $g = GraphViz->new(sort => 1, %othergraphvizopts); GraphViz::Data::Grapher::_init($g, $structure); print $g->as_png;