Mojo::Home - Home sweet home
use Mojo::Home; # Find and manage the project root directory my $home = Mojo::Home->new; $home->detect; say $home->child('templates', 'layouts', 'default.html.ep'); say "$home";
Mojo::Home is a container for home directories based on Mojo::File.
Mojo::Home inherits all methods from Mojo::File and implements the following new ones.
$home = $home->detect; $home = $home->detect('My::App');
Detect home directory from the value of the MOJO_HOME environment variable or the location of the application class.
MOJO_HOME
my $path = $home->mojo_lib_dir;
Path to lib directory in which Mojolicious is installed as a Mojo::Home object.
lib
my $path = $home->rel_file('foo/bar.html');
Return a new Mojo::Home object relative to the home directory.
Mojo::Home inherits all overloaded operators from Mojo::File.
Mojolicious, Mojolicious::Guides, http://mojolicious.org.
To install Mojolicious, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious
CPAN shell
perl -MCPAN -e shell install Mojolicious
For more information on module installation, please visit the detailed CPAN module installation guide.