File Coverage

blib/lib/Alzabo/Display/SWF.pm
Criterion Covered Total %
statement 13 15 86.6
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 18 20 90.0


line stmt bran cond sub pod time code
1             package Alzabo::Display::SWF;
2              
3 1     1   1610 use strict;
  1         3  
  1         46  
4 1     1   6 use warnings;
  1         3  
  1         36  
5 1     1   6 use base qw/Exporter/;
  1         6  
  1         139  
6              
7 1     1   938 use YAML;
  1         22727  
  1         62  
8 1     1   744 use Alzabo::Display::SWF::Schema;
  0            
  0            
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             $_ = ;
67             close CFG;
68             $cfg = Load ( $_ );
69             }
70              
71             1;
72              
73             __END__