# PODNAME: Statocles::Help::Upgrading
# ABSTRACT: A guide to pitfalls when upgrading Statocles

__END__

=pod

=head1 NAME

Statocles::Help::Upgrading - A guide to pitfalls when upgrading Statocles

=head1 VERSION

version 0.064

=head1 DESCRIPTION

This document describes deprecated features and other pitfalls to encounter
when upgrading Statocles.

=head1 DEPRECATIONS

=head2 v0

=over 4

=item site "index" property should be absolute path to index page (got "%s")

The L<site object|Statocles::Site> "index" property used to be the name of the
application that should be used as the index. For this to work, applications
need to say which of their pages should be the site index, which they did by
putting that page first in the list of pages returned. This was magic, and
prone to breakage. It also doesn't allow the site author to choose any page
they want as the site index.

To fix this, set the site's "index" property to the path to the page you want
to be the index page, including the leading slash.

See the L<docs for the index property of the Site object|Statocles::Site/index>
for more information.

Deprecated in v0.051. Fatal in v1.000. Exception removed in v2.000.

Thanks to L<Kyle Sheely|https://github.com/kylesheely> for the idea.

=item Statocles::Store::File is deprecated

Statocles::Store::File was created in anticipation of making other Store
objects like MongoDB or Hadoop. But, having it merely complicates the API
without actually changing whether other Stores could be created (apparently I
forgot that polymorphism exists).

Since the likelihood of those other Stores is low, and since having only one
Statocles::Store doesn't prevent making a Statocles::Store::MongoDB or
Statocles::Store::Custom class, it's better to remove this complexity before
v1.000

The shim module that remains in place will be removed in v1.000.

=item Statocles::Store->write_document returning a value is deprecated

The C<write_document> method for L<Statocles::Store|Statocles::Store> used to
return the full path to the document written. This was for display purposes
only, as developers should be using the store object to deal with the
filesystem. It was thought that this would provide encapsulation, but that was
misguided at best.

With Statocles::Store::File removed, there's no need for a write method to
return anything. Now, C<write_document> and C<write_file> work the same.

The return value will be removed in v1.000.

=item Statocles::App::Plain has been renamed to Statocles::App::Basic

The name "Plain" did not really explain well what the app was. The name "Basic"
implies that it is the base functionality for Statocles apps.

Simply switching your existing Plain apps to Basic apps will solve this problem
with no change to functionality.

The Plain app stub will be removed in v2.000.

=item Statocles::App::Static has been replaced by Statocles::App::Basic

Since every application now has the ability to copy static files, there's no
real reason to have an app specifically for static files. To host static files
without bells and whistles, the Basic app can be used.

The Static app will be removed in v2.000.

=back

=head1 BREAKING CHANGES

=head2 v0.055

=over 4

=item Perldoc application paths have changed

The L<Perldoc app|Statocles::App::Perldoc> now creates directories so that
documentation paths no longer need a C<.html> at the end.

    /pod/Statocles/App.html -> /pod/Statocles/App

The documentation page path now ends with C</index.html>, and the source
page is in the same directory and named C</source.html>.

This change was made to make the URLs look nicer, but also to hopefully allow
for extra documentation collateral in the future, like images and diagrams.

=back

=head1 SEE ALSO

=over 4

=item *

L<Statocles::Help::Policy> - Policy for deprecations

=back

=head1 AUTHOR

Doug Bell <preaction@cpan.org>

=head1 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.

=cut
