File Coverage

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


line stmt bran cond sub pod time code
1             package WWW::PGXN::Mirror;
2              
3 9     9   99 use 5.8.1;
  9         33  
  9         372  
4 9     9   46 use strict;
  9         16  
  9         692  
5              
6             our $VERSION = v0.12.4;
7              
8             BEGIN {
9 9     9   162 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   56 no strict 'refs';
  9         18  
  9         545  
21 81     9   295 *{$attr} = sub { shift->{$attr} };
  81         1763  
  9         1509  
22             }
23             }
24              
25             sub new {
26 2     2 1 4 my ($class, $data) = @_;
27 2         17 bless $data, $class;
28             }
29              
30             sub email {
31 1     1 1 5 my ($host, $user) = split /[|]/ => shift->{email};
32 1         6 return "$user\@$host";
33             }
34              
35             1;
36             __END__