line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package YAPC::Russia; |
2
|
|
|
|
|
|
|
$YAPC::Russia::VERSION = '2.0.0'; |
3
|
|
|
|
|
|
|
# ABSTRACT: Perl conference YAPC::Russia |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
19976
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
32
|
|
7
|
1
|
|
|
1
|
|
4
|
use warnings FATAL => 'all'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
8
|
1
|
|
|
1
|
|
573
|
use utf8; |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
4
|
|
9
|
1
|
|
|
1
|
|
443
|
use open qw(:std :utf8); |
|
1
|
|
|
|
|
874
|
|
|
1
|
|
|
|
|
3
|
|
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
100
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
109
|
|
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
1
|
|
501
|
use Class::Date qw(date); |
|
1
|
|
|
|
|
13067
|
|
|
1
|
|
|
|
|
5
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub new { |
18
|
3
|
|
|
3
|
1
|
1459
|
my ($class, %params) = @_; |
19
|
|
|
|
|
|
|
|
20
|
3
|
|
|
|
|
6
|
my $self = {}; |
21
|
3
|
|
|
|
|
6
|
bless $self, $class; |
22
|
|
|
|
|
|
|
|
23
|
3
|
|
|
|
|
13
|
$self->{_year} = delete $params{year}; |
24
|
3
|
100
|
|
|
|
32
|
croak 'No "year"' if not defined $self->{_year}; |
25
|
|
|
|
|
|
|
|
26
|
2
|
50
|
|
|
|
6
|
croak 'Got unknown params: ' . join(', ', keys %params) if %params; |
27
|
|
|
|
|
|
|
|
28
|
2
|
|
|
|
|
6
|
$self->{_data} = $self->_get_data_for_year($self->{_year}); |
29
|
|
|
|
|
|
|
|
30
|
1
|
|
|
|
|
3
|
return $self; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub get_dates { |
35
|
1
|
|
|
1
|
1
|
4
|
my ($self) = @_; |
36
|
|
|
|
|
|
|
|
37
|
1
|
|
|
|
|
2
|
my @dates; |
38
|
1
|
|
|
|
|
1
|
foreach my $d (@{$self->{_data}->{dates}}) { |
|
1
|
|
|
|
|
3
|
|
39
|
2
|
|
|
|
|
404
|
push @dates, date($d); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
1
|
|
|
|
|
228
|
return @dates; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub get_place { |
47
|
0
|
|
|
0
|
1
|
0
|
my ($self) = @_; |
48
|
|
|
|
|
|
|
|
49
|
0
|
|
|
|
|
0
|
return $self->{_data}->{place}; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub _get_data_for_year { |
53
|
2
|
|
|
2
|
|
3
|
my ($self, $year) = @_; |
54
|
|
|
|
|
|
|
|
55
|
2
|
|
|
|
|
26
|
my %data = ( |
56
|
|
|
|
|
|
|
2014 => { |
57
|
|
|
|
|
|
|
dates => [qw(2014-06-13 2014-06-14)], |
58
|
|
|
|
|
|
|
place => { |
59
|
|
|
|
|
|
|
city => 'Saint Petersburg', |
60
|
|
|
|
|
|
|
name_ru => 'Место Роста', |
61
|
|
|
|
|
|
|
address_ru => 'Курляндская, дом 5', |
62
|
|
|
|
|
|
|
site => 'http://mestorosta.biz', |
63
|
|
|
|
|
|
|
phone => '+7 812 648-13-81', |
64
|
|
|
|
|
|
|
foursquare => 'https://foursquare.com/v/%D0%BC%D0%B5%D1%81%D1%82%D0%BE-%D1%80%D0%BE%D1%81%D1%82%D0%B0/50fe895ce4b0382948fd8148', |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
}, |
67
|
|
|
|
|
|
|
2015 => { |
68
|
|
|
|
|
|
|
dates => [qw(2015-05-16 2015-05-17)], |
69
|
|
|
|
|
|
|
place => { |
70
|
|
|
|
|
|
|
city => 'Moscow', |
71
|
|
|
|
|
|
|
name_ru => 'Mail.ru', |
72
|
|
|
|
|
|
|
address_ru => 'Ленинградский проспект 39, стр. 79', |
73
|
|
|
|
|
|
|
foursquare => 'https://foursquare.com/v/mailru-hq/4b980acdf964a520532835e3', |
74
|
|
|
|
|
|
|
} |
75
|
|
|
|
|
|
|
}, |
76
|
|
|
|
|
|
|
); |
77
|
|
|
|
|
|
|
|
78
|
2
|
100
|
|
|
|
6
|
if (exists $data{$year}) { |
79
|
1
|
|
|
|
|
4
|
return $data{$year}; |
80
|
|
|
|
|
|
|
} else { |
81
|
1
|
|
|
|
|
12
|
croak 'Sorry, no data for year "' . $year . '"'; |
82
|
|
|
|
|
|
|
} |
83
|
|
|
|
|
|
|
} |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
1; |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
__END__ |