Phylo/Treedrawer/Gif.pm untested

filter: Statementstmt 0.0% 0 / 22 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 31 CC 2 SCAR 11.5
CC
2
Cov
0%
_finish
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 3.1
1 package Bio::Phylo::Treedrawer::Gif;
2 use strict;
3 use warnings;
4 use Bio::Phylo::Util::Exceptions 'throw';
5 use Bio::Phylo::Util::Dependency 'Bio::Phylo::Treedrawer::Png';
6 use base 'Bio::Phylo::Treedrawer::Png';
7  
8 =head1 NAME
9  
10 Bio::Phylo::Treedrawer::Gif - Graphics format writer used by treedrawer, no
11 serviceable parts inside
12  
13 =head1 DESCRIPTION
14  
15 This module creates a gif file from a Bio::Phylo::Forest::DrawTree
16 object. It is called by the L<Bio::Phylo::Treedrawer> object, so look there to
17 learn how to create tree drawings.
18  
19  
20 =begin comment
21  
22 # only need to override finish to write to a different format
23  
24 =end comment
25  
26 =cut
27  
28 sub _finish {
29 my $self = shift;
30 my $gif;
31 eval { $gif = $self->_downsample->gif };
32 if ( not $@ ) {
33 return $gif;
34 }
35 else {
36 throw 'ExtensionError' =>
37 "Can't create GIF, libgd probably not compiled with it: $@";
38 }
39 }
40  
41 =head1 SEE ALSO
42  
43 There is a mailing list at L<https://groups.google.com/forum/#!forum/bio-phylo>
44 for any user or developer questions and discussions.
45  
46 =over
47  
48 =item L<Bio::Phylo::Treedrawer>
49  
50 The gif treedrawer is called by the L<Bio::Phylo::Treedrawer> object. Look there
51 to learn how to create tree drawings.
52  
53 =item L<Bio::Phylo::Manual>
54  
55 Also see the manual: L<Bio::Phylo::Manual> and L<http://rutgervos.blogspot.com>.
56  
57 =back
58  
59 =head1 CITATION
60  
61 If you use Bio::Phylo in published research, please cite it:
62  
63 B<Rutger A Vos>, B<Jason Caravas>, B<Klaas Hartmann>, B<Mark A Jensen>
64 and B<Chase Miller>, 2011. Bio::Phylo - phyloinformatic analysis using Perl.
65 I<BMC Bioinformatics> B<12>:63.
66 L<http://dx.doi.org/10.1186/1471-2105-12-63>
67  
68 =cut
69  
70 1;