UML::State is an object oriented module which draws simple state diagrams.
my $diagram = UML::State->new(
# You may change these defaults (doing so may even work):
$UML::State::ROW_SPACING = 75; # all numbers are in pixels
$UML::State::LEFT_MARGIN = 20;
$UML::State::WIDTH = 800;
$UML::State::HEIGHT = 800;
Are you tired of pointing and clicking to make simple diagrams? Do your wrists hurt thinking about making the pretty UML your boss likes so well? Consider using UML::State and UML::Sequence to make your life easier.
UML::State together with drawstate.pl allows you to easily generate state diagrams. You enter them in something like a cross between ASCII art and school room algebra. They come out looking like something from a drawing program like Visio. See drawstate.pl in the distribution for details about the input format and the samples directory for some examples of input and output.
You will probably use this class by running drawstate.pl or drawstatexml.pl which are included in the distribution. But you can use this package directly to gain control over the appearance of your pictures.
The two methods you need are new and draw (see below). If you want, you may change the dimensions by setting the package global variables as shown in the SYNOPSIS. Obviously, no error checking is done, so be careful to use reasonable values (positive numbers are good). All numbers are in pixels (sorry by Bezier's in SVG seem to require pixels). I have not tried changing the numbers, so I don't have any idea if doing so makes reasonable changes to the output.