Skip to content

Commit

Permalink
the lib_dir method no longer serves a purpose
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 8, 2017
1 parent cbfb8c1 commit ddf4e7f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
12 changes: 3 additions & 9 deletions lib/Mojo/Home.pm
Expand Up @@ -24,9 +24,10 @@ sub detect {
return $self->parts(path->to_array);
}

# DEPRECATED!
sub lib_dir {
my $path = path(@{shift->parts}, 'lib');
return -d $path ? $path->to_string : undef;
deprecated 'Mojo::Home::lib_dir is DEPRECATED';
path(@{shift->parts}, 'lib')->to_string;
}

# DEPRECATED!
Expand Down Expand Up @@ -71,7 +72,6 @@ Mojo::Home - Home sweet home
# Find and manage the project root directory
my $home = Mojo::Home->new;
$home->detect;
say $home->lib_dir;
say $home->rel_file('templates/layouts/default.html.ep');
say "$home";
Expand Down Expand Up @@ -103,12 +103,6 @@ following new ones.
Detect home directory from the value of the C<MOJO_HOME> environment variable,
location of the application class, or the current working directory.
=head2 lib_dir
my $path = $home->lib_dir;
Path to C<lib> directory of application.
=head2 mojo_lib_dir
my $path = $home->mojo_lib_dir;
Expand Down
1 change: 0 additions & 1 deletion t/mojo/home.t
Expand Up @@ -52,7 +52,6 @@ is_deeply path($home->to_string)->to_array, path->to_abs->to_array,
# Path generation
$home = Mojo::Home->new($FindBin::Bin);
my $path = path($FindBin::Bin);
is $home->lib_dir, $path->child('lib'), 'right path';
is $home->rel_file('foo.txt'), $path->child('foo.txt'), 'right path';
is $home->rel_file('foo/bar.txt'), $path->child('foo', 'bar.txt'), 'right path';

Expand Down
2 changes: 1 addition & 1 deletion t/pod_coverage.t
Expand Up @@ -9,4 +9,4 @@ plan skip_all => 'Test::Pod::Coverage 1.04+ required for this test!'

# DEPRECATED!
all_pod_coverage_ok(
{also_private => [qw(files is_status_class rel_dir slurp spurt)]});
{also_private => [qw(files is_status_class lib_dir rel_dir slurp spurt)]});

0 comments on commit ddf4e7f

Please sign in to comment.