line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Graph::Writer::DSM::HTML; |
2
|
|
|
|
|
|
|
$Graph::Writer::DSM::HTML::VERSION = '0.007'; |
3
|
1
|
|
|
1
|
|
299283
|
use Modern::Perl; |
|
1
|
|
|
|
|
1728
|
|
|
1
|
|
|
|
|
6
|
|
4
|
1
|
|
|
1
|
|
151
|
use base qw( Graph::Writer ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
462
|
|
5
|
1
|
|
|
1
|
|
894
|
use Mojo::Template; |
|
1
|
|
|
|
|
34060
|
|
|
1
|
|
|
|
|
7
|
|
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.007 |
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
|
|
7538
|
my ($self, %param) = @_; |
47
|
5
|
|
|
|
|
18
|
$self->SUPER::_init(); |
48
|
5
|
|
100
|
|
|
38
|
$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
|
|
491
|
my ($self, $graph, $FILE) = @_; |
59
|
4
|
|
|
|
|
25
|
my $template = Mojo::Template->new; |
60
|
4
|
|
|
|
|
35
|
my $output = $template->render($TEMPLATE, $graph, $self->{title}); |
61
|
4
|
|
|
|
|
13740
|
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__ |