| 1 | package Articulate::Role::Component; | ||
| 2 | 10 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 10 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 10 | ▶ | use Moo::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | =head1 NAME | ||
| 7 | |||
| 8 | Articulate::Role::Component - access the core app and other compnents | ||
| 9 | |||
| 10 | =cut | ||
| 11 | |||
| 12 | =head1 DESCRIPTION | ||
| 13 | |||
| 14 | This role provides accessors so that components can refer to each | ||
| 15 | other. In order to do so they must when created or first called, have | ||
| 16 | their C<app> attribute set. | ||
| 17 | |||
| 18 | =head1 ATTRIBUTE | ||
| 19 | |||
| 20 | =head3 app | ||
| 21 | |||
| 22 | The Articulate app to which this component belongs. | ||
| 23 | |||
| 24 | =head1 METHODS | ||
| 25 | |||
| 26 | Each of these methods are simple read-only accessors which use the | ||
| 27 | C<app> attribute to find the relevant component. | ||
| 28 | |||
| 29 | =head3 augmentation | ||
| 30 | |||
| 31 | Provides access to the app's augmentation component. | ||
| 32 | |||
| 33 | =head3 authentication | ||
| 34 | |||
| 35 | Provides access to the app's authentication component. | ||
| 36 | |||
| 37 | =head3 authorisation | ||
| 38 | |||
| 39 | Provides access to the app's authorisation component. | ||
| 40 | |||
| 41 | =head3 caching | ||
| 42 | |||
| 43 | Provides access to the app's caching component. | ||
| 44 | |||
| 45 | =head3 construction | ||
| 46 | |||
| 47 | Provides access to the app's construction component. | ||
| 48 | |||
| 49 | =head3 enrichment | ||
| 50 | |||
| 51 | Provides access to the app's enrichment component. | ||
| 52 | |||
| 53 | =head3 framework | ||
| 54 | |||
| 55 | Provides access to the app's framework component. | ||
| 56 | |||
| 57 | =head3 navigation | ||
| 58 | |||
| 59 | Provides access to the app's navigation component. | ||
| 60 | |||
| 61 | =head3 serialisation | ||
| 62 | |||
| 63 | Provides access to the app's serialisation component. | ||
| 64 | |||
| 65 | =head3 service | ||
| 66 | |||
| 67 | Provides access to the app's service component. | ||
| 68 | |||
| 69 | =head3 storage | ||
| 70 | |||
| 71 | Provides access to the app's storage component. | ||
| 72 | |||
| 73 | =head3 validation | ||
| 74 | |||
| 75 | Provides access to the app's validation component. | ||
| 76 | |||
| 77 | =cut | ||
| 78 | |||
| 79 | 10 | has app => ( | |
| 80 | is => 'rw', | ||
| 81 | weak_ref => 1, | ||
| 82 | ); | ||
| 83 | |||
| 84 | 3 | ▶ | sub augmentation { shift->app->components->{'augmentation'} } |
|
Subroutine
augmentation: called CC=1 SCAR=0.0
Pod
documented
| |||
| 85 | 0 | ▶ | sub authentication { shift->app->components->{'authentication'} } |
|
Subroutine
authentication: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 86 | 4 | ▶ | sub authorisation { shift->app->components->{'authorisation'} } |
|
Subroutine
authorisation: called CC=1 SCAR=0.0
Pod
documented
| |||
| 87 | 8 | ▶ | sub construction { shift->app->components->{'construction'} } |
|
Subroutine
construction: called CC=1 SCAR=0.0
Pod
documented
| |||
| 88 | 2 | ▶ | sub enrichment { shift->app->components->{'enrichment'} } |
|
Subroutine
enrichment: called CC=1 SCAR=0.0
Pod
documented
| |||
| 89 | 0 | ▶ | sub framework { shift->app->components->{'framework'} } |
|
Subroutine
framework: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 90 | 101 | ▶ | sub navigation { shift->app->components->{'navigation'} } |
|
Subroutine
navigation: called CC=1 SCAR=0.0
Pod
documented
| |||
| 91 | 0 | ▶ | sub serialisation { shift->app->components->{'serialisation'} } |
|
Subroutine
serialisation: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 92 | 0 | ▶ | sub service { shift->app->components->{'service'} } |
|
Subroutine
service: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 93 | 10 | ▶ | sub storage { shift->app->components->{'storage'} } |
|
Subroutine
storage: called CC=1 SCAR=0.0
Pod
documented
| |||
| 94 | 2 | ▶ | sub validation { shift->app->components->{'validation'} } |
|
Subroutine
validation: called CC=1 SCAR=0.0
Pod
documented
| |||
| 95 | 20 | ▶ | sub caching { shift->app->components->{'caching'} } |
|
Subroutine
caching: called CC=1 SCAR=0.0
Pod
documented
| |||
| 96 | |||
| 97 | 10 | 1; | |