The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

GraphViz::Mail - visualise a Mail thread as a tree

SYNOPSIS

 my $threader = Mail::Thread->new( @messages );
 $threader->thread;

 my $i;
 for my $thread ($threader->rootset) {
     ++$i;
         my $gm       = GraphViz::Mail->new($thread);
     write_file( "thread_$i.svg", $gm->as_png );
 }

DESCRIPTION

GraphViz::Mail takes a Mail::Thread::Container and generates a graph of the thread.

METHODS

new

Generic constructor, takes a Mail::Thread::Container

as_*

The Thread can be visualised in a number of different graphical formats. Methods include as_ps, as_hpgl, as_pcl, as_mif, as_pic, as_gd, as_gd2, as_gif, as_jpeg, as_png, as_wbmp, as_ismap, as_imap, as_vrml, as_vtx, as_mp, as_fig, as_svg. See the GraphViz documentation for more information. The two most common methods are:

  # Print out a PNG-format file
  print $g->as_png;

  # Print out a PostScript-format file
  print $g->as_ps;

draw_message( $message )

Draw the message on the Graph.

draw_arc( $from, $to )

draws an arc between two messages

date_of( $container )

The date the message was sent, in epoch seconds

BUGS

None known.

AUTHOR

Simon Wistow <simon@thegestalt.org>

COPYRIGHT

Copyright (C) 2003, Simon Wistow

This module is free software; you can redistribute it or modify it under the same terms as Perl itself.