line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WWW::Connpass::Event::Questionnaire; |
2
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
22
|
|
3
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
198
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
sub new { |
6
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
7
|
0
|
|
|
|
|
|
bless {@_} => $class; |
8
|
|
|
|
|
|
|
} |
9
|
|
|
|
|
|
|
|
10
|
0
|
|
|
0
|
0
|
|
sub raw_data { +{%{shift->{questionnaire}}} } |
|
0
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
0
|
|
|
0
|
0
|
|
sub is_new { not defined shift->id } |
13
|
|
|
|
|
|
|
|
14
|
0
|
|
|
0
|
0
|
|
sub id { shift->{questionnaire}->{id} } |
15
|
0
|
|
|
0
|
0
|
|
sub event { shift->{questionnaire}->{event} } |
16
|
|
|
|
|
|
|
sub questions { |
17
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
18
|
|
|
|
|
|
|
my $questions = $self->{questions} ||= [ |
19
|
0
|
|
|
|
|
|
map { WWW::Connpass::Event::Question->inflate(%$_) } |
20
|
0
|
|
0
|
|
|
|
@{ $self->{questionnaire}->{questions} } |
|
0
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
]; |
22
|
0
|
|
|
|
|
|
return @$questions; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub add_questions { |
26
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
27
|
0
|
|
|
|
|
|
$self->update_questions($self->questions, @_); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub update_questions { |
31
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
32
|
0
|
|
|
|
|
|
$self->{session}->update_questionnaire($self, @_); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
__END__ |