line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Graph::Writer::DSM::HTML; |
2
|
|
|
|
|
|
|
$Graph::Writer::DSM::HTML::VERSION = '0.008'; |
3
|
1
|
|
|
1
|
|
308997
|
use Modern::Perl; |
|
1
|
|
|
|
|
1636
|
|
|
1
|
|
|
|
|
5
|
|
4
|
1
|
|
|
1
|
|
170
|
use base qw( Graph::Writer ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
436
|
|
5
|
1
|
|
|
1
|
|
869
|
use Mojo::Template; |
|
1
|
|
|
|
|
86542
|
|
|
1
|
|
|
|
|
6
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
local $/ = undef; |
8
|
|
|
|
|
|
|
our $TEMPLATE = ; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Graph::Writer::DSM::HTML - draw graph as a DSM matrix in HTML format |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 VERSION |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
version 0.008 |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 DESCRIPTION |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
See L. |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 SYNOPSIS |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
See L. |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 METHODS |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 new() |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Like L, this module provide some extra parameters |
31
|
|
|
|
|
|
|
to new() method. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
Supported parameters are: |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=over 4 |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=item title |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
The title of HTML page. Default: 'Design Structure Matrix'. |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=back |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=cut |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub _init { |
46
|
5
|
|
|
5
|
|
8015
|
my ($self, %param) = @_; |
47
|
5
|
|
|
|
|
26
|
$self->SUPER::_init(); |
48
|
5
|
|
100
|
|
|
33
|
$self->{title} = $param{title} // 'Design Structure Matrix'; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 write_graph() |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
See L. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=cut |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub _write_graph { |
58
|
4
|
|
|
4
|
|
412
|
my ($self, $graph, $FILE) = @_; |
59
|
4
|
|
|
|
|
26
|
my $template = Mojo::Template->new; |
60
|
4
|
|
|
|
|
32
|
my $output = $template->render($TEMPLATE, $graph, $self->{title}); |
61
|
4
|
|
|
|
|
16987
|
print $FILE $output; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
1; |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 SEE ALSO |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
L, L, L. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 CREDITS |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Antonio Terceiro |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 COPYRIGHT |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Copyright (c) 2013, Joenio Costa |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=cut |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
__DATA__ |