NAME

Statocles::App::Role::Store - Role for applications using files

VERSION

version 0.098

SYNOPSIS

package MyApp;
use Statocles::Base 'Class';
with 'Statocles::App::Role::Store';

around pages => sub {
    my ( $orig, $self, %options ) = @_;
    my @pages = $self->$orig( %options );

    # ... Add/remove pages

    return @pages;
};

DESCRIPTION

This role provides some basic functionality for those applications that want to use store objects to manage content with Markdown files.

ATTRIBUTES

store

The directory path or store object containing this app's documents. Required.

METHODS

pages

my @pages = $app->pages;

Get all the pages for this application. Markdown documents are wrapped in Statocles::Page::Document objects, and everything else is wrapped in Statocles::Page::File objects.

AUTHOR

Doug Bell <preaction@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by Doug Bell.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.