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 10     10   44 use strict;
  10         12  
  10         440  
3             __PACKAGE__->HTTP::MobileAgent::make_accessors(
4             qw(width height color depth width_bytes height_bytes)
5             );
6              
7 10     10   43 use vars qw($VERSION);
  10         16  
  10         1159  
8             $VERSION = 0.17;
9              
10             sub new {
11 7     7 0 30 my($class, %data) = @_;
12 7         51 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__