NAME

Arch::Backend - Arch backend feature specific functions

SYNOPSIS

    use Arch::Backend qw(arch_backend is_baz has_file_diffs_cmd);

    my $exe = arch_backend();  # or $Arch::Backend::EXE
    print "No tree, try '$exe init-tree'\n";

    print "Using baz ", Arch::Backend::arch_backend_version,
		" as a backend\n" if is_baz();

    my $cmd = has_file_diffs_cmd()
        ? "file-diffs"
        : "file-diff";
    Arch::Util::run_tla($cmd, $filename);

DESCRIPTION

A set of helper functions suitable for GNU Arch related projects in Perl.

Higher (object oriented) levels of Arch/Perl library make use of these helper functions to query certain aspects (like incompatible features) of the actual arch backend used.

FUNCTIONS

The following functions are available:

arch_backend, arch_backend_name, arch_backend_version, is_baz, is_tla, has_archive_setup_cmd, has_file_diffs_cmd, has_register_archive_name_arg, has_tree_version_dir_opt, has_tree_id_cmd, has_set_tree_version_cmd.

arch_backend [exe]

Return or set the arch backend executable, like "/opt/bin/tla" or "baz-1.3". By default, "tla" is used.

arch_backend_name

Return the brand name of the arch backend, "tla" or "baz".

arch_backend_version

Return the arch backend version, like "1.3.1".

is_tla

Return true if arch_backend_name is "tla".

is_baz

Return true if arch_backend_name is "baz".

has_archive_setup_cmd

Return true if the arch backend has "archive-setup" command. baz removed this command.

has_file_diffs_cmd

Return true if the arch backend has "file-diffs" command. It was renamed to "file-diff" in tla-1.3.

has_register_archive_name_arg

Return true if the arch backend's "register-archive" command supports two positional arguments, one of which is archive name. baz-1.3 removed such syntax; the previous baz versions supported this syntax, but it was useless, since the archive was accessed anyway.

has_tree_version_dir_opt

Return true if the arch backend's "tree-version" command supports "-d" options. This is true for baz.

has_tree_id_cmd

Return true if the arch backend has "tree-id" command. This is true for baz.

has_set_tree_version_cmd

Return true if the arch backend has "set-tree-version" command. baz removed this command and merged it into "tree-version".

BUGS

This module uses heuristics and does not (intend to) provide the perfect information. Requires constant updating.

AUTHORS

Mikhael Goikhman (migo@homemail.com--Perl-GPL/arch-perl--devel).

SEE ALSO

For more information, see tla, baz, Arch.