line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Nephia::Setup::Plugin::Normal; |
2
|
2
|
|
|
2
|
|
2698
|
use 5.008005; |
|
2
|
|
|
|
|
12
|
|
|
2
|
|
|
|
|
93
|
|
3
|
2
|
|
|
2
|
|
12
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
66
|
|
4
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
30
|
|
|
2
|
|
|
|
|
67
|
|
5
|
2
|
|
|
2
|
|
777
|
use parent 'Nephia::Setup::Plugin::Minimal'; |
|
2
|
|
|
|
|
306
|
|
|
2
|
|
|
|
|
17
|
|
6
|
2
|
|
|
2
|
|
10299
|
use File::Spec; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
801
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = "0.04"; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub bundle { |
11
|
1
|
|
|
1
|
1
|
19
|
qw/ Assets::Bootstrap Assets::JQuery /; |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub fix_setup { |
15
|
1
|
|
|
1
|
1
|
43
|
my $self = shift; |
16
|
1
|
|
|
|
|
9
|
my $chain = $self->setup->action_chain; |
17
|
1
|
|
|
|
|
26
|
$chain->delete('CreateClass'); |
18
|
1
|
|
|
|
|
167
|
$chain->delete('CreatePSGI'); |
19
|
1
|
|
|
|
|
50
|
$chain->after('CreateProject', CreateClass => \&create_class); |
20
|
1
|
|
|
|
|
197
|
$chain->after('CreateProject', CreatePSGI => \&create_psgi); |
21
|
1
|
|
|
|
|
122
|
$chain->append(CreateTemplate => \&create_template); |
22
|
|
|
|
|
|
|
|
23
|
1
|
|
|
|
|
106
|
push @{$self->setup->deps->{requires}}, ( |
|
1
|
|
|
|
|
5
|
|
24
|
|
|
|
|
|
|
'Cache::Cache' => '0', |
25
|
|
|
|
|
|
|
'Plack::Middleware::CSRFBlock' => '0', |
26
|
|
|
|
|
|
|
'IPC::ShareLite' => '0', |
27
|
|
|
|
|
|
|
'Nephia::Plugin::ResponseHandler' => '0', |
28
|
|
|
|
|
|
|
); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub create_class { |
32
|
0
|
|
|
0
|
0
|
|
my ($setup, $context) = @_; |
33
|
0
|
|
|
|
|
|
my $data = $context->get('data_section')->(__PACKAGE__)->get_data_section('MyClass.pm'); |
34
|
0
|
|
|
|
|
|
$setup->spew($setup->classfile, $setup->process_template($data)); |
35
|
0
|
|
|
|
|
|
return $context; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub create_psgi { |
39
|
0
|
|
|
0
|
0
|
|
my ($setup, $context) = @_; |
40
|
0
|
|
|
|
|
|
my $data = $context->get('data_section')->(__PACKAGE__)->get_data_section('app.psgi'); |
41
|
0
|
|
|
|
|
|
$setup->spew('app.psgi', $setup->process_template($data)); |
42
|
0
|
|
|
|
|
|
return $context; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub create_template { |
46
|
0
|
|
|
0
|
0
|
|
my ($setup, $context) = @_; |
47
|
0
|
|
|
|
|
|
my $data = $context->get('data_section')->(__PACKAGE__)->get_data_section('index.html'); |
48
|
0
|
|
|
|
|
|
$setup->spew('view', 'index.html', $setup->meta_tmpl->process($setup->process_template($data))); |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
__DATA__ |