February 2006
Intermediate to advanced
304 pages
6h 16m
English
You have the basic information about the regular expression. The next step is to lay things out. The size.pm module has two functions: it decides how big each element of the graph is and it decides where each element goes.
1 use strict; 2 use warnings; 3 4 package size; 5 require Exporter; 6 7 use vars qw/@ISA @EXPORT format_re/; 8 9 @ISA = qw/Exporter/; 10 @EXPORT = qw/convert_re &BOX_FONT_SIZE 11 &X_CHAR_SIZE &X_MARGIN &Y_NODE_SIZE 12 &X_MARGIN &Y_MARGIN &MARGIN 13 &X_NODE_SIZE Y_NODE_SIZE 14 &X_BRANCH_MARGIN &Y_BRANCH_MARGIN 15 &X_TEXT_OFFSET &Y_TEXT_OFFSET 16 @format_re layout_array &BOX_MARGIN/; 17 18 # 19 # Constants that control the layout 20 # 21 # Margin around the graph 22 use constant MARGIN ...