line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CSS::SpriteBuilder::ImageDriver::Auto; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
CSS::SpriteBuilder::ImageDriver::Auto - Class for auto select image manipulation module. |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=cut |
8
|
|
|
|
|
|
|
|
9
|
4
|
|
|
4
|
|
21
|
use warnings; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
102
|
|
10
|
4
|
|
|
4
|
|
18
|
use strict; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
622
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our @MODULES = qw(Image::Magick GD); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
TRY_LOAD: { |
15
|
|
|
|
|
|
|
for (@MODULES) { |
16
|
|
|
|
|
|
|
my $module = $_; |
17
|
|
|
|
|
|
|
$module =~ s/:://g; |
18
|
4
|
|
|
4
|
|
20
|
eval "use base 'CSS::SpriteBuilder::ImageDriver::$module'"; |
|
4
|
|
|
4
|
|
6
|
|
|
4
|
|
|
|
|
2199
|
|
|
4
|
|
|
|
|
22
|
|
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
3277
|
|
19
|
|
|
|
|
|
|
last TRY_LOAD unless $@; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
warn "You need one of these modules: ". join(', ', @MODULES) .", will use fake-mode."; |
22
|
4
|
|
|
4
|
|
22
|
eval "use base 'CSS::SpriteBuilder::ImageDriver::Fake'"; |
|
4
|
|
|
|
|
32
|
|
|
4
|
|
|
|
|
1978
|
|
23
|
|
|
|
|
|
|
}; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |