logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Mojo::Home - Home sweet 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.

Name

       Mojo::Home - Home sweet home

Operators

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

See Also

       Mojolicious, Mojolicious::Guides, <https://mojolicious.org>.

perl v5.40.0                                       2024-12-07                                    Mojo::Home(3pm)

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

See Also