| 1 | package Gears::Config::Reader; | ||||||||||
| 2 | 2 | $Gears::Config::Reader::VERSION = '0.105'; | |||||||||
| 3 | 2 | ▶ | use v5.40; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 2 | ▶ | use Mooish::Base -standard; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 2 | ▶ | use Path::Tiny qw(path); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 4 | ▶ | sub _get_contents ($self, $filename) | ||||||||
|
Subroutine
_get_contents: called CC=1 SCAR=0.0
| |||||||||||
| 9 | { | ||||||||||
| 10 | 4 | return path($filename)->slurp({binmode => ':encoding(UTF-8)'}); | |||||||||
| 11 | } | ||||||||||
| 12 | |||||||||||
| 13 | 4 | ▶ | sub handles ($self, $filename) | ||||||||
|
Subroutine
handles: called CC=3 SCAR=12.7
Pod
documented
| |||||||||||
| 14 | { | ||||||||||
| 15 | 4 | foreach my $ex ($self->handled_extensions) { | |||||||||
| 16 | 4 | ▶ | return true if $filename =~ m/\.\Q$ex\E$/; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 17 | } | ||||||||||
| 18 | |||||||||||
| 19 | 0 | return false; | |||||||||
| 20 | } | ||||||||||
| 21 | |||||||||||
| 22 | # plain array, strings inside must not contain a dot | ||||||||||
| 23 | 0 | ▶ | sub handled_extensions ($self) | ||||||||
|
Subroutine
handled_extensions: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 24 | { | ||||||||||
| 25 | 0 | ...; | |||||||||
| 26 | } | ||||||||||
| 27 | |||||||||||
| 28 | 0 | ▶ | sub parse ($self, $filename) | ||||||||
|
Subroutine
parse: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 29 | { | ||||||||||
| 30 | 0 | ...; | |||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | __END__ | ||||||||||