| line |
true |
false |
branch |
|
45
|
3 |
8 |
unless -d $self->{'js_dir'} |
|
55
|
0 |
0 |
unless opendir my $dh, $dir |
|
57
|
0 |
0 |
if $entry =~ /^\./ |
|
59
|
0 |
0 |
if (-d $path) { } |
|
|
0 |
0 |
elsif ($entry =~ /\.(yaml|pup)$/) { } |
|
63
|
0 |
0 |
if (not exists $self->{'file_mtimes'}{$path} or $self->{'file_mtimes'}{$path} != $mtime) |
|
79
|
0 |
0 |
if ($changed) |
|
86
|
0 |
0 |
$ENV{'SPIDERPUP_DEV'} ? : |
|
96
|
23 |
0 |
if -f $yaml |
|
98
|
0 |
0 |
if -f $pup |
|
104
|
0 |
12 |
if ($file_path =~ /\.pup$/) |
|
105
|
0 |
0 |
unless open my $fh, "<", $file_path |
|
125
|
0 |
0 |
if $path eq "" or $path eq "index" |
|
128
|
0 |
0 |
if (@segments == 1) |
|
130
|
0 |
0 |
if (-d $subdir) |
|
145
|
0 |
7 |
if $path eq "" or $path eq "index.html" |
|
149
|
5 |
2 |
if ($path =~ s[^recipes/][]) { } |
|
155
|
0 |
7 |
unless $component_file |
|
172
|
10 |
4 |
if ($import_path =~ m[^recipes/(.+)$]) { } |
|
178
|
4 |
0 |
$page_file ? : |
|
186
|
4 |
10 |
$is_page ? : |
|
216
|
0 |
0 |
if ($page_name =~ m[^recipes/(.+)$]) { } |
|
221
|
0 |
0 |
if ($component_file) |
|
233
|
0 |
0 |
if ($import_path =~ m[^recipes/(.+)$]) { } |
|
238
|
0 |
0 |
unless $import_file |
|
239
|
0 |
0 |
if exists $collected->{$import_file} |
|
242
|
0 |
0 |
if ($imported_page) |
|
255
|
0 |
0 |
unless -f $paths{'html'} and -f $paths{'meta'} |
|
257
|
0 |
0 |
unless open my $fh, "<", $paths{'meta'} |
|
263
|
0 |
0 |
if $@ or not $cached_mtimes |
|
267
|
0 |
0 |
if keys %$cached_mtimes != keys %$current_mtimes |
|
270
|
0 |
0 |
unless exists $current_mtimes->{$file} |
|
271
|
0 |
0 |
if $current_mtimes->{$file} != $cached_mtimes->{$file} |
|
280
|
0 |
0 |
if ($ENV{'SPIDERPUP_NO_CACHE'}) |
|
285
|
0 |
0 |
if ($self->is_cache_valid($page_name, $page_data)) |
|
287
|
0 |
0 |
unless open my $fh, "<", $paths{'html'} |
|
300
|
0 |
0 |
unless -d $dir |
|
303
|
0 |
0 |
unless open my $html_fh, ">", $paths{'html'} |
|
307
|
0 |
0 |
unless open my $meta_fh, ">", $paths{'meta'} |
|
311
|
0 |
0 |
if $@ |
|
322
|
0 |
0 |
unless defined $key |
|
324
|
0 |
0 |
if ($mode eq 'multiline') { } |
|
|
0 |
0 |
elsif ($mode eq 'array') { } |
|
|
0 |
0 |
elsif ($mode eq 'map') { } |
|
336
|
3 |
3 |
$page->{'methods'} ? : |
|
360
|
2 |
36 |
if ($key =~ /^html_(\w+)$/) |
|
370
|
1 |
5 |
@variant_entries ? : |
|
376
|
3 |
0 |
if ($page->{'vars'} and keys %{$$page{"vars"};}) |
|
380
|
4 |
4 |
if (defined $value and not ref $value and $value =~ /^-?\d+\.?\d*$/) |
|
392
|
3 |
0 |
if ($page->{'methods'} and keys %{$$page{"methods"};}) |
|
400
|
1 |
0 |
if ($page->{'computed'} and keys %{$$page{"computed"};}) |
|
408
|
3 |
0 |
if ($page->{'lifecycle'} and keys %{$$page{"lifecycle"};}) |
|
416
|
0 |
0 |
if ($page->{'initial_store'} and keys %{$$page{"initial_store"};}) |
|
423
|
0 |
0 |
if ($lifecycle_methods[$i] =~ /^\s*onMount\s*=\s*(.+);$/s) |
|
431
|
0 |
0 |
if ($has_onmount) { } |
|
439
|
1 |
2 |
if (@var_methods or @custom_methods or @computed_methods or @lifecycle_methods) |
|
444
|
1 |
0 |
if ($page->{'routes'} and keys %{$$page{"routes"};}) |
|
468
|
1 |
5 |
if ($less) |
|
472
|
0 |
1 |
if $@ |
|
474
|
5 |
1 |
if ($css) |
|
483
|
0 |
6 |
$initial_store_js ? : |
|
507
|
0 |
2 |
unless $component_file |
|
527
|
0 |
2 |
if ($dep_data and $dep_data->{'recipes'} and ref $dep_data->{'recipes'} eq "HASH") |
|
539
|
0 |
2 |
if ($dep_data and $dep_data->{'recipes'}) |
|
548
|
1 |
1 |
if ($page_data->{'recipes'} and ref $page_data->{'recipes'} eq "HASH") |
|
556
|
2 |
0 |
@import_pairs ? : |
|
560
|
1 |
1 |
if ($page_data->{'recipes'} and ref $page_data->{'recipes'} eq "HASH") |
|
572
|
2 |
0 |
if (@import_lines) |
|
578
|
0 |
2 |
unless open my $fh, ">", $js_file |
|
589
|
2 |
0 |
if $dep_file |
|
591
|
0 |
2 |
unless open my $meta_fh, ">", $meta_file |
|
603
|
1 |
0 |
if (-f $paths{'js'} and -f $paths{'meta'} and not $ENV{'SPIDERPUP_NO_CACHE'}) |
|
604
|
0 |
1 |
unless open my $fh, "<", $paths{'meta'} |
|
608
|
1 |
0 |
if ($cached) |
|
611
|
0 |
2 |
if (not -f $file or (stat $file)[9] != $cached->{$file}) |
|
616
|
1 |
0 |
if $valid |
|
632
|
0 |
3 |
unless $component_file |
|
654
|
2 |
3 |
if ($dep_is_page) { } |
|
663
|
2 |
3 |
if ($dep_data and $dep_data->{'recipes'} and ref $dep_data->{'recipes'} eq "HASH") |
|
672
|
2 |
3 |
if ($dep_is_page) { } |
|
682
|
2 |
3 |
if ($dep_data and $dep_data->{'recipes'}) |
|
691
|
0 |
3 |
if ($page_data->{'recipes'} and ref $page_data->{'recipes'} eq "HASH") |
|
699
|
2 |
1 |
@import_pairs ? : |
|
703
|
0 |
3 |
if ($page_data->{'recipes'} and ref $page_data->{'recipes'} eq "HASH") |
|
715
|
2 |
1 |
if (@import_lines) |
|
722
|
1 |
2 |
unless -d $js_dir |
|
724
|
0 |
3 |
unless open my $fh, ">", $js_file |
|
734
|
2 |
3 |
$dep_is_page ? : |
|
736
|
5 |
0 |
if $dep_file |
|
738
|
0 |
3 |
unless open my $meta_fh, ">", $meta_file |
|
752
|
1 |
0 |
if (-f $js_file and -f $meta_file and not $ENV{'SPIDERPUP_NO_CACHE'}) |
|
753
|
0 |
1 |
unless open my $fh, "<", $meta_file |
|
757
|
1 |
0 |
if ($cached) |
|
760
|
0 |
4 |
if (not -f $file or (stat $file)[9] != $cached->{$file}) |
|
765
|
1 |
0 |
if $valid |
|
781
|
0 |
0 |
defined $vars->{$1} ? : |
|
787
|
0 |
8 |
unless defined $text |
|
810
|
0 |
10 |
if $seen->{$idx} |
|
813
|
0 |
10 |
unless $node |
|
815
|
5 |
5 |
if (exists $node->{'content'}) |
|
819
|
0 |
5 |
if (exists $node->{'*content'}) |
|
827
|
0 |
5 |
if ($tag eq "if") |
|
830
|
0 |
0 |
unless $sib and $sib->{'tag'} and $sib->{'tag'} eq 'elseif' || $sib->{'tag'} eq 'else' |
|
832
|
0 |
0 |
if $sib->{'tag'} eq "else" |
|
837
|
0 |
5 |
if $tag eq "elseif" or $tag eq "else" |
|
844
|
0 |
5 |
if ($tag eq "slot") |
|
845
|
0 |
0 |
if ($slot_children and @$slot_children) |
|
851
|
0 |
0 |
unless $child |
|
853
|
0 |
0 |
if ($slot_name) { } |
|
854
|
0 |
0 |
unless defined $child_slot and $child_slot eq $slot_name |
|
856
|
0 |
0 |
if defined $child_slot |
|
871
|
0 |
5 |
if ($recipes_map and $recipes_map->{$tag}) |
|
876
|
0 |
0 |
if ($mod_data->{'vars'}) |
|
881
|
0 |
0 |
if $attr =~ /^\*/ |
|
882
|
0 |
0 |
if $attr eq "for" or $attr eq "slot" |
|
883
|
0 |
0 |
if $attr =~ /^!/ |
|
889
|
0 |
0 |
if ($variant and $$mod_data{"html_$variant"}) { } |
|
912
|
0 |
0 |
if ($children and @$children and not $self->_has_slot_tag($mod_structure)) |
|
924
|
3 |
2 |
if ($tag eq "link") |
|
927
|
1 |
2 |
$to eq '/' ? : |
|
937
|
0 |
2 |
if ($tag eq "router") |
|
941
|
0 |
2 |
if ($attrs->{'*for'}) |
|
948
|
0 |
2 |
if ($VOID_TAGS{$tag}) |
|
964
|
0 |
0 |
if $attr =~ /^\*/ |
|
965
|
0 |
0 |
if $attr eq "for" or $attr eq "slot" or $attr eq "condition" |
|
966
|
0 |
0 |
if $attr =~ /^!/ |
|
968
|
0 |
0 |
if ref $val |
|
978
|
0 |
0 |
if ($child->{'tag'} // "") eq "slot" |
|
979
|
0 |
0 |
if $self->_has_slot_tag($child) |
|
992
|
0 |
0 |
unless $mod_data |
|
998
|
0 |
0 |
if ($mod_data->{'recipes'} and ref $mod_data->{'recipes'} eq "HASH") |
|
1008
|
0 |
2 |
if ($page_data->{'recipes'} and ref $page_data->{'recipes'} eq "HASH") |
|
1050
|
0 |
0 |
if (-f $file_path) { } |
|
1051
|
0 |
0 |
unless (open my $fh, "<", $file_path) |
|
1081
|
0 |
2 |
if ($less) |
|
1083
|
0 |
0 |
if $@ |
|
1086
|
0 |
2 |
if ($css) |
|
1106
|
0 |
2 |
if (@$inline_js) |
|
1112
|
1 |
1 |
$base_url_path ? : |
|
1124
|
2 |
0 |
$ssr_test ne '' ? : |
|
1175
|
0 |
0 |
if $@ |
|
1177
|
0 |
0 |
if ($load_error) { } |
|
|
0 |
0 |
elsif (defined $page_data) { } |
|
1240
|
0 |
0 |
if ($@) |
|
1324
|
0 |
0 |
if ($is_ssl) { } |
|
1334
|
0 |
0 |
unless $listener = "IO::Socket::SSL"->new("LocalAddr", "0.0.0.0", "LocalPort", $port, "Proto", "tcp", "Listen", 4096, "Reuse", 1, "SSL_cert_file", $opts{'ssl_cert'}, "SSL_key_file", $opts{'ssl_key'}) |
|
1336
|
0 |
0 |
unless $listener = "IO::Socket::INET"->new("LocalAddr", "0.0.0.0", "LocalPort", $port, "Proto", "tcp", "Listen", 4096, "Reuse", 1) |
|
1345
|
0 |
0 |
$is_ssl ? : |
|
1354
|
0 |
0 |
unless (defined $pid) |
|
1360
|
0 |
0 |
if ($pid == 0) |
|
1380
|
0 |
0 |
if ($path =~ m[^/?(.+\.js)$]) |
|
1382
|
0 |
0 |
if (-f $js_file) { } |
|
1384
|
0 |
0 |
unless open my $fh, "<", $js_file |
|
1400
|
0 |
0 |
if (not $response and $path =~ /\.(yaml|pup)$/) |
|
1404
|
0 |
0 |
if (-f $raw_file) |
|
1405
|
0 |
0 |
unless open my $fh, "<", $raw_file |
|
1408
|
0 |
0 |
$raw_file =~ /\.pup$/ ? : |
|
1420
|
0 |
0 |
unless ($response) |
|
1426
|
0 |
0 |
if ($@) |
|
1445
|
0 |
0 |
unless opendir my $dh, $dir |
|
1450
|
0 |
0 |
if $entry =~ /^\./ |
|
1453
|
0 |
0 |
if (-d $path) { } |
|
|
0 |
0 |
elsif ($entry =~ /\.(yaml|pup)$/) { } |
|
1454
|
0 |
0 |
$prefix ? : |
|
1459
|
0 |
0 |
$prefix ? : |
|
1469
|
0 |
0 |
unless -d $self->{'js_dir'} |
|
1476
|
0 |
0 |
unless opendir my $mod_dh, $self->{'recipes_dir'} |
|
1485
|
0 |
0 |
if ($@) { } |
|
1503
|
0 |
0 |
if ($page_data) |
|
1508
|
0 |
0 |
unless -d $dir |
|
1510
|
0 |
0 |
unless open my $html_fh, ">", $paths{'html'} |
|
1515
|
0 |
0 |
unless open my $meta_fh, ">", $paths{'meta'} |
|
1522
|
0 |
0 |
if ($@) |
|
1529
|
0 |
0 |
if (@errors) |
|
1547
|
0 |
0 |
if ($self->update_file_mtimes) |