File Coverage

blib/lib/Paper/Specs/base/sheet.pm
Criterion Covered Total %
statement 6 15 40.0
branch 0 2 0.0
condition n/a
subroutine 2 10 20.0
pod 0 8 0.0
total 8 35 22.8


line stmt bran cond sub pod time code
1              
2             package Paper::Specs::base::sheet;
3 1     1   5 use strict;
  1         2  
  1         29  
4              
5 1     1   6 use vars qw($VERSION);
  1         2  
  1         301  
6             $VERSION=0.01;
7              
8             sub new {
9 0     0 0   my $class=shift;
10 0 0         bless \$class, $class unless ref($class);
11             }
12              
13 0     0 0   sub type { return 'sheet' }
14              
15 0     0 0   sub sheet_width { Paper::Specs::convert ($_[0]->specs->{'sheet_width'}, $_[0]->specs->{'units'}) }
16 0     0 0   sub sheet_height { Paper::Specs::convert ($_[0]->specs->{'sheet_height'}, $_[0]->specs->{'units'}) }
17 0     0 0   sub sheet_size { return ($_[0]->sheet_width, $_[0]->sheet_height) }
18              
19             sub specs {
20 0     0 0   die "$_[0] does not have any specs defined!\n";
21             }
22              
23 0     0 0   sub code { $_[0]->specs->{'code'} }
24 0     0 0   sub description { $_[0]->specs->{'description'} }
25              
26             1;
27