Skip to content

Commit

Permalink
Mojolicious 3 support
Browse files Browse the repository at this point in the history
  • Loading branch information
sshaw committed Jul 12, 2012
1 parent b2de517 commit d9fa318
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ WriteMakefile(
AUTHOR => 'Skye Shaw <sshaw AT lucas.cis.temple.edu>',
VERSION_FROM => 'lib/Mojolicious/Command/secret.pm',
ABSTRACT_FROM => 'lib/Mojolicious/Command/secret.pm',
PREREQ_PM => { 'Mojolicious' => 0 },
PREREQ_PM => { 'Mojolicious' => 3 },
LICENSE => 'perl',
(eval { ExtUtils::MakeMaker->VERSION(6.46) } ?
(META_MERGE => { resources => { bugtracker => 'http://github.com/sshaw/Mojolicious-Command-secret/issues',
Expand Down
7 changes: 4 additions & 3 deletions lib/Mojolicious/Command/secret.pm
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package Mojolicious::Command::secret;

use Mojo::Base 'Mojo::Command';
use Mojo::Base 'Mojolicious::Command';
use Mojo::Util 'class_to_path';

use File::Spec;
use Getopt::Long qw(GetOptionsFromArray :config no_ignore_case no_auto_abbrev); # Match Mojo's commands

our $VERSION = '0.01';
our $VERSION = '0.02';

has description => "Create an application secret() consisting of random bytes\n";
has usage => <<USAGE;
Expand Down Expand Up @@ -37,7 +38,7 @@ sub run
return unless $ok;

my $secret = _create_secret($module, $size);
my $filename = $self->class_to_path(ref($self->app));
my $filename = class_to_path(ref($self->app));
my $path = $filename eq 'Mojolicious/Lite.pm' ? $0 : File::Spec->catdir('lib', $filename);

# If we're called as `mojo` just print the secret
Expand Down

0 comments on commit d9fa318

Please sign in to comment.