File Coverage

blib/lib/WWW/PGXN/Mirror.pm
Criterion Covered Total %
statement 16 16 100.0
branch n/a
condition n/a
subroutine 7 7 100.0
pod 2 2 100.0
total 25 25 100.0


line stmt bran cond sub pod time code
1             package WWW::PGXN::Mirror;
2              
3 9     9   114 use 5.8.1;
  9         31  
4 9     9   57 use strict;
  9         34  
  9         663  
5              
6             our $VERSION = v0.13.0;
7              
8             BEGIN {
9 9     9   72 for my $attr (qw(
10             uri
11             frequency
12             location
13             organization
14             timezone
15             bandwidth
16             src
17             rsync
18             notes
19             )) {
20 9     9   119 no strict 'refs';
  9         31  
  9         673  
21 81     9   273 *{$attr} = sub { shift->{$attr} };
  81         1954  
  9         1812  
22             }
23             }
24              
25             sub new {
26 2     2 1 5 my ($class, $data) = @_;
27 2         33 bless $data, $class;
28             }
29              
30             sub email {
31 1     1 1 7 my ($host, $user) = split /[|]/ => shift->{email};
32 1         6 return "$user\@$host";
33             }
34              
35             1;
36             __END__