Skip to content

Commit

Permalink
workaround for deprecation warning on Perl 5.10.1 (closes #1036)
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 13, 2017
1 parent 4e2cc18 commit 1a37eff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

7.19 2017-01-12
7.19 2017-01-13

7.18 2017-01-11
- Fixed support for relative %INC paths in Mojo::Home.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Home.pm
Expand Up @@ -13,7 +13,7 @@ sub detect {
# Location of the application class (Windows mixes backslash and slash)
elsif ($class && (my $path = $INC{my $file = class_to_path $class})) {
$home = Mojo::File->new($path)->to_array;
splice @$home, split('/', $file) * -1;
splice @$home, (my @dummy = split('/', $file)) * -1;
pop @$home if @$home && ($home->[-1] eq 'blib' || $home->[-1] eq 'lib');
}

Expand Down

0 comments on commit 1a37eff

Please sign in to comment.