other versions
- bookworm 9.31+dfsg-1
- bookworm-backports 9.37+dfsg-2~bpo12+1
- testing 9.38+dfsg-1
- unstable 9.38+dfsg-1
Mojo::Home(3pm) | User Contributed Perl Documentation | Mojo::Home(3pm) |
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, Mojolicious::Guides, <https://mojolicious.org>.
2024-08-17 | perl v5.38.2 |