.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Arch::Backend 3pm" .TH Arch::Backend 3pm "2022-06-08" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Arch::Backend \- Arch backend feature specific functions .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Arch::Backend qw(arch_backend is_baz has_file_diffs_cmd); \& \& my $exe = arch_backend(); \& print "Not in tree, try \*(Aq$exe init\-tree\*(Aq\en"; \& \& my $version = Arch::Backend::arch_backend_version; \& print "Using baz $version as a backend\en" if is_baz(); \& \& my $cmd = has_file_diffs_cmd() \& ? "file\-diffs" \& : "file\-diff"; \& Arch::Util::run_tla($cmd, $filename); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" A set of helper functions suitable for \s-1GNU\s0 Arch related projects in Perl. .PP 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. .SH "FUNCTIONS" .IX Header "FUNCTIONS" The following functions are available: .PP \&\fBarch_backend\fR, \&\fBarch_backend_name\fR, \&\fBarch_backend_version\fR, \&\fBis_tla\fR, \&\fBis_baz\fR, \&\fBhas_archive_setup_cmd\fR, \&\fBhas_file_diffs_cmd\fR, \&\fBhas_register_archive_name_arg\fR, \&\fBhas_tree_version_dir_opt\fR, \&\fBhas_tree_id_cmd\fR, \&\fBhas_set_tree_version_cmd\fR, \&\fBhas_cache_feature\fR, \&\fBget_cache_config\fR, \&\fBhas_commit_version_arg\fR, \&\fBhas_commit_files_separator\fR, \&\fBhas_revlib_patch_set_dir\fR. .IP "\fBarch_backend\fR [\fIexe\fR]" 4 .IX Item "arch_backend [exe]" Return or set the arch backend executable, like \*(L"/opt/bin/tla\*(R" or \*(L"baz\-1.3\*(R". .Sp By default, the arch backend executable is taken from environment variable \&\f(CW$ARCH_BACKEND\fR (or \f(CW$TLA\fR, or \f(CW$BAZ\fR). If no environment variable is set, then \&\*(L"tla\*(R" is used. .IP "\fBarch_backend_name\fR" 4 .IX Item "arch_backend_name" Return the brand name of the arch backend, \*(L"tla\*(R" or \*(L"baz\*(R". .IP "\fBarch_backend_version\fR" 4 .IX Item "arch_backend_version" Return the arch backend version, like \*(L"1.3.1\*(R". .IP "\fBis_tla\fR" 4 .IX Item "is_tla" Return true if \fBarch_backend_name\fR is \*(L"tla\*(R". .IP "\fBis_baz\fR" 4 .IX Item "is_baz" Return true if \fBarch_backend_name\fR is \*(L"baz\*(R". .IP "\fBhas_archive_setup_cmd\fR" 4 .IX Item "has_archive_setup_cmd" Return true if the arch backend has \*(L"archive-setup\*(R" command. baz removed this command. .IP "\fBhas_file_diffs_cmd\fR" 4 .IX Item "has_file_diffs_cmd" Return true if the arch backend has \*(L"file-diffs\*(R" command. It was renamed to \*(L"file-diff\*(R" in tla\-1.3. .IP "\fBhas_register_archive_name_arg\fR" 4 .IX Item "has_register_archive_name_arg" Return true if the arch backend's \*(L"register-archive\*(R" 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. .IP "\fBhas_tree_version_dir_opt\fR" 4 .IX Item "has_tree_version_dir_opt" Return true if the arch backend's \*(L"tree-version\*(R" command supports \*(L"\-d\*(R" options. This is true for baz. .IP "\fBhas_tree_id_cmd\fR" 4 .IX Item "has_tree_id_cmd" Return true if the arch backend has \*(L"tree-id\*(R" command. This is true for baz. .IP "\fBhas_set_tree_version_cmd\fR" 4 .IX Item "has_set_tree_version_cmd" Return true if the arch backend has \*(L"set-tree-version\*(R" command. baz removed this command and merged it into \*(L"tree-version\*(R". .IP "\fBhas_cache_feature\fR" 4 .IX Item "has_cache_feature" Return true if the arch backend supports Arch Cache feature. This is true for baz. .IP "\fBget_cache_config\fR" 4 .IX Item "get_cache_config" Return hash with the following keys: dir \- directory of the local cache (or undef if not applicable). .IP "\fBhas_commit_version_arg\fR" 4 .IX Item "has_commit_version_arg" Return true if the arch backend's \*(L"commit\*(R" command supports version argument. baz\-1.4 removed this functionality. .IP "\fBhas_commit_files_separator\fR" 4 .IX Item "has_commit_files_separator" Return true if the arch backend's \*(L"commit\*(R" command requires \*(L"\-\-\*(R" argument to separate files. baz\-1.4 removed this separator. .IP "\fBhas_revlib_patch_set_dir\fR" 4 .IX Item "has_revlib_patch_set_dir" Return true if the arch backend's creates ,,patch\-set subdirectory in revision library. baz\-1.4 removed this functionality. .SH "BUGS" .IX Header "BUGS" This module uses heuristics and does not (intend to) provide the perfect information. Requires constant updating. .SH "AUTHORS" .IX Header "AUTHORS" Mikhael Goikhman (migo@homemail.com\*(--Perl\-GPL/arch\-perl\*(--devel). .SH "SEE ALSO" .IX Header "SEE ALSO" For more information, see tla, baz, Arch.