File Coverage

blib/lib/Imager/Image/Xbm.pm
Criterion Covered Total %
statement 18 18 100.0
branch 2 4 50.0
condition n/a
subroutine 5 5 100.0
pod 0 1 0.0
total 25 28 89.2


line stmt bran cond sub pod time code
1             # -*- perl -*-
2              
3             # Copyright (C) 2015 Slaven Rezic. All rights reserved.
4             # This package is free software; you can redistribute it and/or
5             # modify it under the same terms as Perl itself.
6              
7             package Imager::Image::Xbm;
8              
9 1     1   475 use strict;
  1         2  
  1         70  
10 1     1   4 use vars qw($VERSION);
  1         2  
  1         63  
11             $VERSION = '0.01';
12              
13 1     1   6 use base 'Imager::Image::Base';
  1         1  
  1         92  
14              
15 1     1   480 use Image::Xbm;
  1         2231  
  1         89  
16              
17             sub new {
18 1     1 0 1639 my($class, %opts) = @_;
19 1         2 my $file = delete $opts{file};
20 1 50       6 die 'file option is mandatory' if !defined $file;
21 1 50       18 die 'Unhandled options: ' . join(' ', %opts) if %opts;
22 1         9 my $xbm = Image::Xbm->new(-file => $file);
23 1         388 $class->convert($xbm);
24             }
25              
26             1;
27              
28             __END__