File Coverage

blib/lib/HTTP/MobileAgent/Display.pm
Criterion Covered Total %
statement 8 10 80.0
branch 0 2 0.0
condition n/a
subroutine 3 4 75.0
pod 1 2 50.0
total 12 18 66.6


line stmt bran cond sub pod time code
1             package HTTP::MobileAgent::Display;
2 14     14   97 use strict;
  14         25  
  14         716  
3             __PACKAGE__->HTTP::MobileAgent::make_accessors(
4             qw(width height color depth width_bytes height_bytes)
5             );
6              
7 14     14   83 use vars qw($VERSION);
  14         35  
  14         2047  
8             $VERSION = 0.17;
9              
10             sub new {
11 8     8 0 43 my($class, %data) = @_;
12 8         77 bless {%data}, $class;
13             }
14              
15             sub size {
16 0     0 1   my $self = shift;
17 0 0         return wantarray ? ($self->width, $self->height) : $self->width * $self->height;
18             }
19              
20             1;
21             __END__