-
-
23 May 2022 15:17:22 UTC
- Distribution: Mojolicious
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues
- Testers (980 / 6 / 30)
- Kwalitee
Bus factor: 6- 90.64% Coverage
- License: artistic_2
- Perl: v5.16.0
- Activity
24 month- Tools
- Download (827.39KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
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
Module Install Instructions
To install Mojolicious, copy and paste the appropriate command in to your terminal.
cpanm Mojolicious
perl -MCPAN -e shell install Mojolicious
For more information on module installation, please visit the detailed CPAN module installation guide.