blib/lib/Comics/Plugin/S1ngle.pm untested

filter: Statementstmt 0.0% 0 / 19 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 28 CC 3 SCAR 19.5
CC
3
Cov
0%
register
12.0
BEGIN
2.0
BEGIN
2.0
CRAP 7.0
1 #! perl
2  
3 use strict;
4 use warnings;
5  
6 package Comics::Plugin::S1ngle;
7  
8 use parent qw(Comics::Fetcher::Direct);
9  
10 our $VERSION = "0.01";
11  
12 sub register {
13  
14 # S1ngle has strips ma, di, .., za (weekdays).
15 # Strips on the site are usually some days behind.
16  
17 my @tm = localtime;
18 my $wd = $tm[6];
19 $wd += 7 if $wd < 0;
20 $wd = 6 if $wd == 0;
21 $wd = qw( ma di wo do vr za )[$wd-1];
22  
23 shift->SUPER::register
24 ( { name => "S1ngle",
25 url => "http://www.s1ngle.nl/",
26 path => "strips/$wd.gif",
27 } );
28 }
29  
30 # Important: Return the package name!
31 __PACKAGE__;