| 1 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | |||||||||||
| 4 | package App::Embra::Plugin::Favicon; | ||||||||||
| 5 | 1 | $App::Embra::Plugin::Favicon::VERSION = '0.001'; # TRIAL | |||||||||
| 6 | # ABSTRACT: adds a favicon | ||||||||||
| 7 | |||||||||||
| 8 | 1 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 1 | ▶ | use Method::Signatures; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | |||||||||||
| 12 | |||||||||||
| 13 | has 'filename' => ( | ||||||||||
| 14 | is => 'ro', | ||||||||||
| 15 | 1 | ▶ | default => sub { 'favicon.ico' }, | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 16 | 1 | ); | |||||||||
| 17 | |||||||||||
| 18 | 1 | ▶ | has 'file' => ( | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.1
Branch: 1 branch
| |||||||||||
| 19 | 1 | is => 'lazy', | |||||||||
| 20 | default => method { | ||||||||||
| 21 | 1 | App::Embra::File->new( name => $self->filename ) | |||||||||
| 22 | }, | ||||||||||
| 23 | 1 | ▶ | ); | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.0
Branch: 1 branch
| |||||||||||
| 24 | 1 | ||||||||||
| 25 | has 'fragment' => ( | ||||||||||
| 26 | is => 'ro', | ||||||||||
| 27 | 1 | default => method { qq{<link rel="icon" type="image/x-icon" href="${ \ $self->file->name }">} }, | |||||||||
| 28 | init_arg => undef, | ||||||||||
| 29 | ); | ||||||||||
| 30 | |||||||||||
| 31 | has 'clipboard' => ( | ||||||||||
| 32 | is => 'ro', | ||||||||||
| 33 | 1 | default => 'head', | |||||||||
| 34 | init_arg => undef, | ||||||||||
| 35 | 1 | ▶ | ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
gather_files: called CC=2 SCAR=7.0
Branch: 1 branch
| |||||||||||
| 36 | 1 | ||||||||||
| 37 | with 'App::Embra::Role::Snippet'; | ||||||||||
| 38 | |||||||||||
| 39 | 1 | method gather_files { | |||||||||
| 40 | $self->add_file( App::Embra::File->new( name => $self->filename ) ); | ||||||||||
| 41 | 1 | } | |||||||||
| 42 | |||||||||||
| 43 | with 'App::Embra::Role::FileGatherer'; | ||||||||||
| 44 | |||||||||||
| 45 | 1; | ||||||||||
| 46 | |||||||||||
| 47 | __END__ | ||||||||||