line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id: Pinwin.pm,v 1.6 2008/08/03 17:08:40 asc Exp $ |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
2004
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
73
|
|
4
|
|
|
|
|
|
|
package Net::Flickr::Geo::Pinwin; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
$Net::Flickr::Geo::Pinwin::VERSION = '0.72'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 NAME |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Net::Flickr::Geo::Pinwin - markers for geotagged Flickr photos |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 SYNOPSIS |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
use Net::Flickr::Geo::Pinwin; |
15
|
|
|
|
|
|
|
my $pinwin = Net::Flickr::Geo::Pinwin->mk_flickr_pinwin(); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 DESCRIPTION |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
Markers for geotagged Flickr photos. |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=cut |
22
|
|
|
|
|
|
|
|
23
|
1
|
|
|
1
|
|
1357
|
use File::Temp qw (tempfile); |
|
1
|
|
|
|
|
25040
|
|
|
1
|
|
|
|
|
84
|
|
24
|
1
|
|
|
1
|
|
978
|
use MIME::Base64; |
|
1
|
|
|
|
|
909
|
|
|
1
|
|
|
|
|
179
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 PACKAGE METHODS |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=cut |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head2 __PACKAGE__->mk_flickr_pinwin() |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
Create a file containing a Flickr-style map marker window that in to which you can |
33
|
|
|
|
|
|
|
paste a 75 x 75 pixel image. |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
Returns the path to the newly created pinwin marker. |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=cut |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub mk_flickr_pinwin { |
40
|
0
|
|
|
0
|
1
|
|
my $pkg = shift; |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
|
|
|
my $b64 = ''; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
{ |
45
|
0
|
|
|
|
|
|
local $/; |
|
0
|
|
|
|
|
|
|
46
|
0
|
|
|
|
|
|
undef $/; |
47
|
0
|
|
|
|
|
|
$b64 = ; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
0
|
|
|
|
|
|
my ($fh, $pinwin) = tempfile(UNLINK => 0, SUFFIX => ".png"); |
51
|
|
|
|
|
|
|
|
52
|
0
|
|
|
|
|
|
$fh->print(MIME::Base64::decode_base64($b64)); |
53
|
0
|
|
|
|
|
|
$fh->close(); |
54
|
|
|
|
|
|
|
|
55
|
0
|
|
|
|
|
|
return $pinwin; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 VERSION |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
0.72 |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 DATE |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
$Date: 2008/08/03 17:08:40 $ |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 AUTHOR |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Aaron Straup Cope Eascope@cpan.orgE |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 SEE ALSO |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
L |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 BUGS |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Sure, why not. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Please report all bugs via L |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 LICENSE |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
Copyright (c) 2007-2008 Aaron Straup Cope. All Rights Reserved. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
This is free software. You may redistribute it and/or |
85
|
|
|
|
|
|
|
modify it under the same terms as Perl itself. |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=cut |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
return 1; |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
__DATA__ |