line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lego::Part::Image::LugnetCom; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# Pragmas. |
4
|
4
|
|
|
4
|
|
68704
|
use base qw(Lego::Part::Image); |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
2091
|
|
5
|
4
|
|
|
4
|
|
20
|
use strict; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
75
|
|
6
|
4
|
|
|
4
|
|
43
|
use warnings; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
102
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# Modules. |
9
|
4
|
|
|
4
|
|
19
|
use Error::Pure qw(err); |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
438
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# Version. |
12
|
|
|
|
|
|
|
our $VERSION = 0.04; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# Get image URL. |
15
|
|
|
|
|
|
|
sub image_url { |
16
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
17
|
0
|
0
|
|
|
|
|
if (! defined $self->{'part'}->design_id) { |
18
|
0
|
|
|
|
|
|
err "Design ID doesn't defined."; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
my $url = sprintf 'http://img.lugnet.com/ld/%s.gif', |
21
|
0
|
|
|
|
|
|
$self->{'part'}->design_id; |
22
|
0
|
|
|
|
|
|
return $url; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
__END__ |