Mojo::Home(3pm)

Mojo::Home3pm

Home sweet home

Usage

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

Overview

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.

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 7 times.

  1. 6.0
  2. 7
  3. 8
  4. 9
  5. 10
  6. 11
  7. 12
  8. 13

From libmojolicious-perl 9.39+dfsg-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.