App-LXC-Container
view release on metacpan or search on metacpan
lib/App/LXC/Container/Mounts.pm view on Meta::CPAN
package App::LXC::Container::Mounts;
# Author, Copyright and License: see end of file
=head1 NAME
App::LXC::Container::Mounts - manage mount-points for LXC container configuration
=head1 SYNOPSIS
use App::LXC::Container::Mounts;
my $mounts = App::LXC::Container::Mounts->new();
$mounts->mount_point($path, EXPLICIT);
if ($mounts->mount_point($path) == IMPLICIT) { ... }
$mounts->mount_point($path, REMOVE);
$mounts->merge_mount_points(12);
... foreach $mounts->sub_directories($path);
say $out $_ foreach $mounts->implicit_mount_lines('/');
$mounts->create_mount_points('/');
=head1 ABSTRACT
This module is used by L<App::LXC::Container::Update> to manage the
(possible) mount-points of a container that is updated.
=head1 DESCRIPTION
The module handles all kinds of mount-points of an LXC container
configuration created (and maybe destroyed again) during the update of an
LXC container.
=cut
#########################################################################
use v5.14;
use strictures;
no indirect 'fatal';
no multidimensional;
use warnings 'once';
our $VERSION = "0.41";
use Cwd 'abs_path';
use App::LXC::Container::Texts;
#########################################################################
=head1 EXPORT
All access functions are exported by default as that's the point of this
module.
=cut
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
require Exporter;
our @ISA = qw(Exporter);
our @EXPORT = qw(REMOVE
UNDEFINED
IGNORE
NO_MERGE
EMPTY
COPY
EXPLICIT
IMPLICIT
IMPLICIT_LINK
);
# possible states of a possible mount-point or directory above it:
use constant REMOVE => -1;
use constant UNDEFINED => 0;
use constant IGNORE => 1;
use constant NO_MERGE => 2;
use constant EMPTY => 3;
use constant COPY => 4;
use constant EXPLICIT => 5;
use constant IMPLICIT => 6;
use constant IMPLICIT_LINK => 7; # an optional copy that may be merged away
#########################################################################
( run in 0.476 second using v1.01-cache-2.11-cpan-aadc1410aed )