Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
no need for require anymore
  • Loading branch information
kraih committed Apr 7, 2016
1 parent 0a35b09 commit aa5259d
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

6.58 2016-04-06
6.58 2016-04-07
- Added fork policy to Mojolicious::Guides::Contributing.
- Improved Mojo::JSON to generate canonical JSON objects.

Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Command/generate/app.pm
Expand Up @@ -119,9 +119,9 @@ use warnings;
use FindBin;
BEGIN { unshift @INC, "$FindBin::Bin/../lib" }
use Mojolicious::Commands;
# Start command line interface for application
require Mojolicious::Commands;
Mojolicious::Commands->start_app('<%= $class %>');
@@ appclass
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Guides/Cookbook.pod
Expand Up @@ -1474,9 +1474,9 @@ to the proper shebang during installation.

use FindBin;
BEGIN { unshift @INC, "$FindBin::Bin/../lib" }
use Mojolicious::Commands;

# Start command line interface for application
require Mojolicious::Commands;
Mojolicious::Commands->start_app('MyApp');

That's really everything, now you can package your application like any other
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojolicious/Guides/Growing.pod
Expand Up @@ -629,9 +629,9 @@ allow running tests again.
use warnings;

use lib 'lib';
use Mojolicious::Commands;

# Start command line interface for application
require Mojolicious::Commands;
Mojolicious::Commands->start_app('MyApp');

And the directory structure of our hybrid application should be looking like
Expand Down Expand Up @@ -754,9 +754,9 @@ C<@INC>, allowing us to start the application from outside its home directory.

use FindBin;
BEGIN { unshift @INC, "$FindBin::Bin/../lib" }
use Mojolicious::Commands;

# Start command line interface for application
require Mojolicious::Commands;
Mojolicious::Commands->start_app('MyApp');

=head2 Simplified tests
Expand Down
3 changes: 2 additions & 1 deletion script/mojo
Expand Up @@ -3,7 +3,8 @@
use strict;
use warnings;

require Mojolicious::Commands;
use Mojolicious::Commands;

Mojolicious::Commands->start_app('Mojo::HelloWorld');

=encoding utf8
Expand Down
2 changes: 1 addition & 1 deletion t/mojolicious/external/script/my_app
Expand Up @@ -5,7 +5,7 @@ use warnings;

use FindBin;
BEGIN { unshift @INC, "$FindBin::Bin/../lib" }
use Mojolicious::Commands;

# Start command line interface for application
require Mojolicious::Commands;
Mojolicious::Commands->start_app('MyApp');

0 comments on commit aa5259d

Please sign in to comment.