| 1 | package Articulate::Serialisation::SiteConfig; | ||
| 2 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | 1 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 1 | with 'Articulate::Role::Component'; | |
| 7 | |||
| 8 | =head1 NAME | ||
| 9 | |||
| 10 | PlainSpeaking::Serialisation::SiteConfig | ||
| 11 | |||
| 12 | =head1 METHODS | ||
| 13 | |||
| 14 | =head3 serialise | ||
| 15 | |||
| 16 | Adds site data to the response data. | ||
| 17 | |||
| 18 | =cut | ||
| 19 | |||
| 20 | has site_data => ( | ||
| 21 | is => 'rw', | ||
| 22 | 0 | ▶ | default => sub { {} } |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 23 | 1 | ); | |
| 24 | |||
| 25 | sub serialise { | ||
| 26 | 0 | ▶ | my $self = shift; |
|
Subroutine
serialise: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 27 | 0 | my $response = shift; | |
| 28 | 0 | $response->data->{site} = $self->site_data; | |
| 29 | 0 | return undef; | |
| 30 | } | ||
| 31 | |||
| 32 | 1 | 1; | |