Mail::Thread::Arc - Generates a Thread Arc reperesentation of a thread


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


 my $i;
 for my $thread ($threader->rootset) {
     my $svg = $arc->render( $thread );
     write_file( "thread_$i.svg", $svg->xmlify );


Mail::Thread::Arc takes a Mail::Thread::Container and generates an image of the Thread Arc. Thread Arcs are described in the documentation for IBM's remail project.



Generic constructor, inherited from Class::Accessor::Chained::Fast

render( $root_container, %options )

The main method.

Renders the thread tree as a thread arc. Returns an SVG object.

draw_message( $message )

Draw the message on the SVG canvas.

make_link( $message )

Return an URI based on the message. By default returns undef meaning that that the message is not a link.

However if this module is subclassed then a meaningful URI can be returned where appropriate.

draw_arc( $from, $to )

draws an arc between two messages


The radius of the message circles. The most magic of all the magic numbers.

message_style( $container )

Returns the style hash for the message circle.


the maximum height of an arc. default is 17 message radii

arc_style( $from, $to )

Returns the style hash for the connecting arc,

message_x( $container )

returns the X co-ordinate for a message


returns the Y co-ordinate for a message (expected to be constant for all messages)

thread_generation( $message )

returns the thread generation of the container.

date_of( $container )

The date the message was sent, in epoch seconds


Richard Clamp <>


Copyright (C) 2003 Richard Clamp. All Rights Reserved.

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


ReMail, the IBM Research project that implements Thread Arcs. - some sample output, alongside .pngs created with batik-rasteriser.

Mail::Thread, Mail::Thread::Chronological, SVG