# this is part of the actions-dispatch of my wiki-project 'analyze' => sub { use GraphViz; use MIME::Base64; my $g = GraphViz->new(); $g->add_node($_) for keys %$wiki; while (my ($k, $v) = each %$wiki) { $g->add_edge($k => $_) for ($v =~ /$wikiwords/g); } return $q->header(), $q->start_html('ANALYZE'), 'debug', $q->end_html; }