Skip to content

Commit

Permalink
we use $app in examples now
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jul 2, 2015
1 parent f2f98d0 commit ac3ef4f
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

6.13 2015-06-30
6.13 2015-07-02
- Improved subscribers method in Mojo::EventEmitter to allow subscribers to be
modified more easily.

Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Plugin/Charset.pm
Expand Up @@ -22,7 +22,7 @@ Mojolicious::Plugin::Charset - Charset plugin
=head1 SYNOPSIS
# Mojolicious
$self->plugin(Charset => {charset => 'Shift_JIS'});
$app->plugin(Charset => {charset => 'Shift_JIS'});
# Mojolicious::Lite
plugin Charset => {charset => 'Shift_JIS'};
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Plugin/Config.pm
Expand Up @@ -77,7 +77,7 @@ Mojolicious::Plugin::Config - Perl-ish configuration plugin
};
# Mojolicious
my $config = $self->plugin('Config');
my $config = $app->plugin('Config');
say $config->{foo};
# Mojolicious::Lite
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Plugin/DefaultHelpers.pm
Expand Up @@ -162,7 +162,7 @@ Mojolicious::Plugin::DefaultHelpers - Default helpers plugin
=head1 SYNOPSIS
# Mojolicious
$self->plugin('DefaultHelpers');
$app->plugin('DefaultHelpers');
# Mojolicious::Lite
plugin 'DefaultHelpers';
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Plugin/EPLRenderer.pm
Expand Up @@ -66,7 +66,7 @@ Mojolicious::Plugin::EPLRenderer - Embedded Perl Lite renderer plugin
=head1 SYNOPSIS
# Mojolicious
$self->plugin('EPLRenderer');
$app->plugin('EPLRenderer');
# Mojolicious::Lite
plugin 'EPLRenderer';
Expand Down
6 changes: 3 additions & 3 deletions lib/Mojolicious/Plugin/EPRenderer.pm
Expand Up @@ -71,9 +71,9 @@ Mojolicious::Plugin::EPRenderer - Embedded Perl renderer plugin
=head1 SYNOPSIS
# Mojolicious
$self->plugin('EPRenderer');
$self->plugin(EPRenderer => {name => 'foo'});
$self->plugin(EPRenderer => {template => {line_start => '.'}});
$app->plugin('EPRenderer');
$app->plugin(EPRenderer => {name => 'foo'});
$app->plugin(EPRenderer => {template => {line_start => '.'}});
# Mojolicious::Lite
plugin 'EPRenderer';
Expand Down
6 changes: 3 additions & 3 deletions lib/Mojolicious/Plugin/HeaderCondition.pm
Expand Up @@ -40,16 +40,16 @@ Mojolicious::Plugin::HeaderCondition - Header condition plugin
=head1 SYNOPSIS
# Mojolicious
$self->plugin('HeaderCondition');
$self->routes->get('/:controller/:action')
$app->plugin('HeaderCondition');
$app->routes->get('/:controller/:action')
->over(headers => {Referer => qr/example\.com/});
# Mojolicious::Lite
plugin 'HeaderCondition';
get '/' => (headers => {Referer => qr/example\.com/}) => sub {...};
# All headers need to match
$self->routes->get('/:controller/:action')->over(headers => {
$app->routes->get('/:controller/:action')->over(headers => {
'X-Secret-Header' => 'Foo',
Referer => qr/example\.com/
});
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Plugin/JSONConfig.pm
Expand Up @@ -52,7 +52,7 @@ Mojolicious::Plugin::JSONConfig - JSON configuration plugin
}
# Mojolicious
my $config = $self->plugin('JSONConfig');
my $config = $app->plugin('JSONConfig');
say $config->{foo};
# Mojolicious::Lite
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Plugin/Mount.pm
Expand Up @@ -31,7 +31,7 @@ Mojolicious::Plugin::Mount - Application mount plugin
=head1 SYNOPSIS
# Mojolicious
my $route = $self->plugin(Mount => {'/prefix' => '/home/sri/myapp.pl'});
my $route = $app->plugin(Mount => {'/prefix' => '/home/sri/myapp.pl'});
# Mojolicious::Lite
my $route = plugin Mount => {'/prefix' => '/home/sri/myapp.pl'};
Expand Down
6 changes: 3 additions & 3 deletions lib/Mojolicious/Plugin/PODRenderer.pm
Expand Up @@ -119,9 +119,9 @@ Mojolicious::Plugin::PODRenderer - POD renderer plugin
=head1 SYNOPSIS
# Mojolicious (with documentation browser under "/perldoc")
my $route = $self->plugin('PODRenderer');
my $route = $self->plugin(PODRenderer => {name => 'foo'});
my $route = $self->plugin(PODRenderer => {preprocess => 'epl'});
my $route = $app->plugin('PODRenderer');
my $route = $app->plugin(PODRenderer => {name => 'foo'});
my $route = $app->plugin(PODRenderer => {preprocess => 'epl'});
# Mojolicious::Lite (with documentation browser under "/perldoc")
my $route = plugin 'PODRenderer';
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Plugin/TagHelpers.pm
Expand Up @@ -213,7 +213,7 @@ Mojolicious::Plugin::TagHelpers - Tag helpers plugin
=head1 SYNOPSIS
# Mojolicious
$self->plugin('TagHelpers');
$app->plugin('TagHelpers');
# Mojolicious::Lite
plugin 'TagHelpers';
Expand Down

0 comments on commit ac3ef4f

Please sign in to comment.