SWF.pm

filter: Statementstmt 86.6% 13 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 90.0% 18 / 20 CC 1 SCAR 0.6
CC
1
Cov
87%
BEGIN
1.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« SWF/Schema.pm ↑ Summary
1 package Alzabo::Display::SWF;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use base qw/Exporter/;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶use YAML;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 0 ▶use Alzabo::Display::SWF::Schema;
Subroutine BEGIN: called CC=1 SCAR=2.6
9  
10 our $VERSION = '0.01';
11 our @EXPORT_OK = qw/$cfg/;
12 our $cfg = Load( <<'...' );
13 ---
14 schema:
15 fdb: Verdana-B
16 color:
17 bg: xFFFFFF
18 fg: xA80806
19 edge:
20 width: 2
21 opacity: 40
22  
23 table:
24 fdb: Verdana-B
25 linestyle:
26 width: 2
27 color: x999999
28 color:
29 bg: xD8DDB3
30 fg: xA80806
31 edge:
32 width: 2
33 opacity: 40
34 key:
35 primary: xE6BAB9
36 foreign: xA80806
37  
38 column:
39 fdb:
40 over: Verdana-B
41 up: Verdana-B
42 color:
43 bg: xF3F5E5
44 fg:
45 over: x72726E
46 up: xCC9966
47  
48 fdb_dir: '.'
49 ...
50  
51 sub create {
52 my ($pkg, $name) = @_;
53 my $schema = Alzabo::Display::SWF::Schema->new(
54 name => $name, cfg => $cfg
55 );
56 $schema->create_graph;
57 $schema->create_movie;
58 return $schema;
59 }
60  
61 sub import {
62 shift;
63 return unless $_[0];
64 local $/ = undef;
65 open CFG, "<$_[0]" or die "$_[0]: $!";
66 $_ = <CFG>;
67 close CFG;
68 $cfg = Load ( $_ );
69 }
70  
71 1;
72  
73 __END__
« SWF/Schema.pm ↑ Summary