| 1 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | 1 | ▶ | use v5.28; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | package App::puzzl::run; | ||||||||||
| 4 | |||||||||||
| 5 | 1 | ▶ | use Exporter 'import'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 1 | ▶ | use Module::Load; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 0 | ▶ | sub run_day { | ||||||||
|
Subroutine
run_day: not called CC=4 SCAR=26.4
Pod
undocumented
| |||||||||||
| 9 | 0 | my ($day) = @_; | |||||||||
| 10 | |||||||||||
| 11 | 0 | ▶ | if($day eq 'all') { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 12 | 0 | ▶ | my @days = glob("days/day*.pl"); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.2
| |||||||||||
| 13 | 0 | foreach my $day_found (@days) { | |||||||||
| 14 | 0 | run($day_found); | |||||||||
| 15 | } | ||||||||||
| 16 | 0 | return; | |||||||||
| 17 | } | ||||||||||
| 18 | |||||||||||
| 19 | 0 | ▶ | open(my $input_fh, "<", "input/day$day.txt") or die "failed to open input file input/day$day.txt"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 20 | 0 | do "./days/day$day.pl"; | |||||||||
| 21 | 0 | say '=== PART 1 ==='; | |||||||||
| 22 | 0 | part1($input_fh); | |||||||||
| 23 | |||||||||||
| 24 | 0 | seek($input_fh, 0, 0); | |||||||||
| 25 | 0 | say '=== PART 2 ==='; | |||||||||
| 26 | 0 | part2($input_fh); | |||||||||
| 27 | |||||||||||
| 28 | 0 | close($input_fh); | |||||||||
| 29 | } | ||||||||||
| 30 | |||||||||||
| 31 | 1 | our @EXPORT_OK = qw(run_day); | |||||||||
| 32 | |||||||||||
| 33 | 1 | 1; | |||||||||