Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
more examples for additional static/template classes
  • Loading branch information
kraih committed Mar 17, 2012
1 parent 390b4f9 commit 6da6666
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Changes
@@ -1,5 +1,8 @@
This file documents the revision history for Perl extension Mojolicious.

2.63 2012-03-17 00:00:00
- Improved documentation.

2.62 2012-03-17 00:00:00
- Deprecated Mojolicious::Renderer->default_template_class in favor
of Mojolicious::Renderer->classes.
Expand Down
8 changes: 7 additions & 1 deletion lib/Mojolicious.pm
Expand Up @@ -33,7 +33,7 @@ has static => sub { Mojolicious::Static->new };
has types => sub { Mojolicious::Types->new };

our $CODENAME = 'Leaf Fluttering In Wind';
our $VERSION = '2.62';
our $VERSION = '2.63';

# "These old doomsday devices are dangerously unstable.
# I'll rest easier not knowing where they are."
Expand Down Expand Up @@ -316,6 +316,9 @@ contain more information.
# Add another "templates" directory
push @{$app->renderer->paths}, '/foo/bar/templates';
# Add another class with templates in DATA section
push @{$app->renderer->classes}, 'Mojolicious::Plugin::Fun';
=head2 C<routes>
my $routes = $app->routes;
Expand Down Expand Up @@ -362,6 +365,9 @@ L<Mojolicious::Static> object.
# Add another "public" directory
push @{$app->static->paths}, '/foo/bar/public';
# Add another class with static files in DATA section
push @{$app->static->classes}, 'Mojolicious::Plugin::Fun';
=head2 C<types>
my $types = $app->types;
Expand Down
3 changes: 3 additions & 0 deletions lib/Mojolicious/Renderer.pm
Expand Up @@ -302,6 +302,9 @@ Renderer cache, defaults to a L<Mojo::Cache> object.
Classes to use for finding templates in C<DATA> section, defaults to C<main>.
# Add another class with templates in DATA section
push @{$renderer->classes}, 'Mojolicious::Plugin::Fun';
=head2 C<default_format>
my $default = $renderer->default_format;
Expand Down
3 changes: 3 additions & 0 deletions lib/Mojolicious/Static.pm
Expand Up @@ -203,6 +203,9 @@ L<Mojolicious::Static> implements the following attributes.
Classes to use for finding files in C<DATA> section, defaults to C<main>.
# Add another class with static files in DATA section
push @{$static->classes}, 'Mojolicious::Plugin::Fun';
=head2 C<paths>
my $paths = $static->paths;
Expand Down

0 comments on commit 6da6666

Please sign in to comment.