Navigation Menu

Skip to content

Commit

Permalink
let basename remove the extension
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 29, 2017
1 parent 334e72b commit 4912cbc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/Mojolicious/Lite.pm
Expand Up @@ -21,8 +21,7 @@ sub import {
push @{"${caller}::ISA"}, 'Mojo';

# Generate moniker based on filename
my $moniker = path($ENV{MOJO_EXE})->basename;
$moniker =~ s/\.(?:pl|pm|t)$//i;
my $moniker = path($ENV{MOJO_EXE})->basename('.pl', '.pm', '.t');
my $app = shift->new(moniker => $moniker);

# Initialize routes without namespaces
Expand Down

0 comments on commit 4912cbc

Please sign in to comment.