From b6d9f3136a018f8bf9044b519a50ebd32ef51e9a Mon Sep 17 00:00:00 2001 From: Ed J Date: Sun, 8 Apr 2018 03:40:03 +0100 Subject: [PATCH 1/6] Statocles::App -> Statocles::Role::App --- README.mkdn | 2 +- lib/Statocles.pm | 2 +- lib/Statocles/App/Blog.pm | 2 +- lib/Statocles/App/Perldoc.pm | 2 +- lib/Statocles/App/Role/Store.pm | 2 +- lib/Statocles/App/Static.pm | 4 ++-- lib/Statocles/Document.pm | 4 ++-- lib/Statocles/Help.pod | 2 +- lib/Statocles/Help/Config.pod | 2 +- lib/Statocles/Help/Content.pod | 4 ++-- lib/Statocles/Help/Develop.pod | 2 +- lib/Statocles/Help/Theme.pod | 2 +- lib/Statocles/Page.pm | 2 +- lib/Statocles/Page/Document.pm | 2 +- lib/Statocles/{ => Role}/App.pm | 4 ++-- lib/Statocles/Site.pm | 6 +++--- lib/Statocles/Template.pm | 2 +- lib/Statocles/Theme.pm | 2 +- t/app/template.t | 2 +- t/app/url.t | 2 +- t/deprecated.t | 4 ++-- t/lib/TestApp.pm | 2 +- 22 files changed, 29 insertions(+), 29 deletions(-) rename lib/Statocles/{ => Role}/App.pm (98%) diff --git a/README.mkdn b/README.mkdn index 4f2f60be..cca897c9 100644 --- a/README.mkdn +++ b/README.mkdn @@ -53,7 +53,7 @@ language](https://metacpan.org/pod/Mojo::Template#SYNTAX). - [Automatic checking for broken links](https://metacpan.org/pod/Statocles::Plugin::LinkCheck). - [Syntax highlighting](https://metacpan.org/pod/Statocles::Plugin::Highlight) for code and configuration blocks. - Hooks to add [your own plugins](https://metacpan.org/pod/Statocles::Plugin) and [your own custom -applications](https://metacpan.org/pod/Statocles::App). +applications](https://metacpan.org/pod/Statocles::Role::App). # ATTRIBUTES diff --git a/lib/Statocles.pm b/lib/Statocles.pm index bb83dfc6..52d31253 100644 --- a/lib/Statocles.pm +++ b/lib/Statocles.pm @@ -264,7 +264,7 @@ L for code and configuration b =item * Hooks to add L and L. +applications|Statocles::Role::App>. =back diff --git a/lib/Statocles/App/Blog.pm b/lib/Statocles/App/Blog.pm index 4d1d3ec5..d97badcc 100644 --- a/lib/Statocles/App/Blog.pm +++ b/lib/Statocles/App/Blog.pm @@ -760,7 +760,7 @@ The post author =over 4 -=item L +=item L =back diff --git a/lib/Statocles/App/Perldoc.pm b/lib/Statocles/App/Perldoc.pm index c11e388f..ac4b6ca5 100644 --- a/lib/Statocles/App/Perldoc.pm +++ b/lib/Statocles/App/Perldoc.pm @@ -7,7 +7,7 @@ use Statocles::Page::Plain; use Scalar::Util qw( blessed ); use Pod::Simple::Search; use Pod::Simple::XHTML; -with 'Statocles::App'; +with 'Statocles::Role::App'; =attr inc diff --git a/lib/Statocles/App/Role/Store.pm b/lib/Statocles/App/Role/Store.pm index 32b05da5..e4bd31fb 100644 --- a/lib/Statocles/App/Role/Store.pm +++ b/lib/Statocles/App/Role/Store.pm @@ -27,7 +27,7 @@ to use L to manage content with Markdown files. use Statocles::Base 'Role'; use Statocles::Page::Document; use Statocles::Page::File; -with 'Statocles::App'; +with 'Statocles::Role::App'; =attr store diff --git a/lib/Statocles/App/Static.pm b/lib/Statocles/App/Static.pm index 98497958..846ba239 100644 --- a/lib/Statocles/App/Static.pm +++ b/lib/Statocles/App/Static.pm @@ -5,7 +5,7 @@ our $VERSION = '0.094'; use Statocles::Base 'Class'; use Statocles::Page::File; use Statocles::Util qw( derp ); -with 'Statocles::App'; +with 'Statocles::Role::App'; =attr store @@ -54,5 +54,5 @@ B This application's functionality has been added to L. You can use the Basic app to replace this app. This class will be removed with v2.0. See L. -This L manages static content with no processing, +This L manages static content with no processing, perfect for images, stylesheets, scripts, or already-built HTML. diff --git a/lib/Statocles/Document.pm b/lib/Statocles/Document.pm index b7b24565..df0182db 100644 --- a/lib/Statocles/Document.pm +++ b/lib/Statocles/Document.pm @@ -312,7 +312,7 @@ This disables processing the content as a template. This can speed up processing when the content is not using template directives. This can be also set in the application -(L), or for the entire site +(L), or for the entire site (L). =cut @@ -461,7 +461,7 @@ __END__ =head1 DESCRIPTION A Statocles::Document is the base unit of content in Statocles. -L take documents to build +L take documents to build L. Documents are usually written as files, with the L in Markdown, diff --git a/lib/Statocles/Help.pod b/lib/Statocles/Help.pod index bd2cce9e..d465abdd 100644 --- a/lib/Statocles/Help.pod +++ b/lib/Statocles/Help.pod @@ -48,7 +48,7 @@ L =item * -L - Base app role +L - Base app role =over 4 diff --git a/lib/Statocles/Help/Config.pod b/lib/Statocles/Help/Config.pod index 9efff465..8a3759f1 100644 --- a/lib/Statocles/Help/Config.pod +++ b/lib/Statocles/Help/Config.pod @@ -39,7 +39,7 @@ More on that later. =head2 An App -A L is the driver that turns documents into +A L is the driver that turns documents into L. To build pages, we need a store full of documents. We define our store with the string C, which will get magically coerced into a L. diff --git a/lib/Statocles/Help/Content.pod b/lib/Statocles/Help/Content.pod index 27da6b17..353ce17c 100644 --- a/lib/Statocles/Help/Content.pod +++ b/lib/Statocles/Help/Content.pod @@ -16,7 +16,7 @@ file|Statocles::Help::Config>. We can use that name to access the app's command-line commands. Not all applications have or need commands. See L for more information. +documentation|Statocles::Role::App/"SEE ALSO"> for more information. =head3 Create a Blog Post @@ -211,7 +211,7 @@ When the content is being generated, you have access to the following variables: =item C<$site> - The current L -=item C<$app> - The current L +=item C<$app> - The current L =back diff --git a/lib/Statocles/Help/Develop.pod b/lib/Statocles/Help/Develop.pod index e3b11774..6167fe74 100644 --- a/lib/Statocles/Help/Develop.pod +++ b/lib/Statocles/Help/Develop.pod @@ -22,7 +22,7 @@ L read and write documents. =item * -L use Stores to read documents and create +L use Stores to read documents and create L. =item * diff --git a/lib/Statocles/Help/Theme.pod b/lib/Statocles/Help/Theme.pod index b9d57cad..4f5f46ce 100644 --- a/lib/Statocles/Help/Theme.pod +++ b/lib/Statocles/Help/Theme.pod @@ -117,7 +117,7 @@ every template are: =item C<$site> - The current L object -=item C<$app> - The current L object +=item C<$app> - The current L object =back diff --git a/lib/Statocles/Page.pm b/lib/Statocles/Page.pm index 36d62a5d..4e47e964 100644 --- a/lib/Statocles/Page.pm +++ b/lib/Statocles/Page.pm @@ -28,7 +28,7 @@ The application this page came from, so we can give it to the templates. has app => ( is => 'ro', - isa => ConsumerOf['Statocles::App'], + isa => ConsumerOf['Statocles::Role::App'], ); =attr path diff --git a/lib/Statocles/Page/Document.pm b/lib/Statocles/Page/Document.pm index 0acc2381..89d85005 100644 --- a/lib/Statocles/Page/Document.pm +++ b/lib/Statocles/Page/Document.pm @@ -108,7 +108,7 @@ If true, disables the processing of the content as a template. This will improve performance if you're not using any template directives in your content. This can be set in the document (L), -the application (L), or the site +the application (L), or the site (L). =cut diff --git a/lib/Statocles/App.pm b/lib/Statocles/Role/App.pm similarity index 98% rename from lib/Statocles/App.pm rename to lib/Statocles/Role/App.pm index 594d7c2a..8500a601 100644 --- a/lib/Statocles/App.pm +++ b/lib/Statocles/Role/App.pm @@ -1,4 +1,4 @@ -package Statocles::App; +package Statocles::Role::App; our $VERSION = '0.094'; # ABSTRACT: Base role for Statocles applications @@ -201,7 +201,7 @@ __END__ package MyApp; use Statocles::Base 'Class'; - with 'Statocles::App'; + with 'Statocles::Role::App'; sub pages { return Statocles::Page::Content->new( diff --git a/lib/Statocles/Site.pm b/lib/Statocles/Site.pm index c3a344e4..19fcadce 100644 --- a/lib/Statocles/Site.pm +++ b/lib/Statocles/Site.pm @@ -85,7 +85,7 @@ that can be used later. has apps => ( is => 'ro', - isa => HashRef[ConsumerOf['Statocles::App']], + isa => HashRef[ConsumerOf['Statocles::Role::App']], default => sub { {} }, ); @@ -367,7 +367,7 @@ This disables processing the content as a template. This can speed up processing when the content is not using template directives. This can be also set in the application -(L), or for each document +(L), or for each document (L). =cut @@ -778,7 +778,7 @@ __END__ =head1 DESCRIPTION -A Statocles::Site is a collection of L. +A Statocles::Site is a collection of L. =head1 EVENTS diff --git a/lib/Statocles/Template.pm b/lib/Statocles/Template.pm index 51bb1fe7..d845e467 100644 --- a/lib/Statocles/Template.pm +++ b/lib/Statocles/Template.pm @@ -369,7 +369,7 @@ L to render the markdown into HTML. %= markdown include 'path/include.markdown' Render the given markdown text into HTML. This is useful for allowing users to -write markdown in L, and L in +write markdown in L, and L in the L, or L attributes in the document frontmatter. diff --git a/lib/Statocles/Theme.pm b/lib/Statocles/Theme.pm index f0dd1445..66a0fa7e 100644 --- a/lib/Statocles/Theme.pm +++ b/lib/Statocles/Theme.pm @@ -272,7 +272,7 @@ __END__ =head1 DESCRIPTION A Theme contains all the L that -L need. This class handles finding and parsing +L need. This class handles finding and parsing files into L