manpagez: man pages & more
man Mojo::Home(3)
Home | html | info | man
Mojo::Home(3)         User Contributed Perl Documentation        Mojo::Home(3)




NAME

       Mojo::Home - Home sweet home


SYNOPSIS

         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";


DESCRIPTION

       Mojo::Home is a container for home directories based on Mojo::File.


METHODS

       Mojo::Home inherits all methods from Mojo::File and implements the
       following new ones.

   detect
         $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.

   rel_file
         my $path = $home->rel_file('foo/bar.html');

       Return a new Mojo::Home object relative to the home directory.


OPERATORS

       Mojo::Home inherits all overloaded operators from Mojo::File.


SEE ALSO

       Mojolicious(3), Mojolicious::Guides(3), <https://mojolicious.org>.



perl v5.32.1                      2021-12-08                     Mojo::Home(3)

mojolicious 9.260.0 - Generated Fri May 27 08:54:13 CDT 2022
© manpagez.com 2000-2025
Individual documents may contain additional copyright information.