line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
2234
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
40
|
|
2
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
69
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package App::Embra::Plugin::Cname; |
5
|
|
|
|
|
|
|
$App::Embra::Plugin::Cname::VERSION = '0.001'; # TRIAL |
6
|
|
|
|
|
|
|
# ABSTRACT: adds a file containing the site's canonical domain name |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
805
|
use Method::Signatures; |
|
1
|
|
|
|
|
61273
|
|
|
1
|
|
|
|
|
7
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
804
|
use App::Embra::File; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
40
|
|
11
|
1
|
|
|
1
|
|
7
|
use Moo; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
has 'domain' => ( |
16
|
|
|
|
|
|
|
is => 'ro', |
17
|
|
|
|
|
|
|
required => 1, |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
has 'filename' => ( |
22
|
|
|
|
|
|
|
is => 'ro', |
23
|
|
|
|
|
|
|
default => sub { 'CNAME' }, |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
|
26
|
1
|
50
|
|
1
|
|
879
|
method gather_files { |
|
1
|
|
|
1
|
|
51
|
|
|
1
|
|
|
|
|
5
|
|
27
|
1
|
|
|
|
|
14
|
$self->add_file( App::Embra::File->new( name => $self->filename, content => $self->domain ) ); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
with 'App::Embra::Role::FileGatherer'; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
__END__ |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=pod |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=encoding UTF-8 |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 NAME |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
App::Embra::Plugin::Cname - adds a file containing the site's canonical domain name |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 VERSION |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
version 0.001 |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 DESCRIPTION |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
This plugin will add a F<CNAME> file to the site. Use this plugin if you are hosting the site L<on GitHub with a custom domain name|https://help.github.com/articles/setting-up-a-custom-domain-with-pages#setting-the-domain-in-your-repo>. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head2 domain |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
The canonical domain name for the site (the host part of its URI). This is required. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head2 filename |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
The filename to store the site's canonical domain name in. It defaults to F<CNAME>. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 AUTHOR |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Daniel Holz <dgholz@gmail.com> |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
This software is copyright (c) 2015 by Daniel Holz. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
71
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=cut |