Arch::Backend(3pm)
π Arch::Backend β the manual, but make it cute β¨
okay bestie, so this is Arch::Backend from the User Contributed Perl Documentation, and it's basically the backstage crew for GNU Arch stuff in Perl. manual name is Arch::Backend(3pm) if you needed it for the group chat receipts π
πΈ NAME πΈ
Arch::Backend β Arch backend feature specific functions. that's it, that's the whole name, she's straightforward and I respect it π
β¨ SYNOPSIS β¨
here's the vibe, copy-paste ready:
use Arch::Backend qw(arch_backend is_baz has_file_diffs_cmd);
my $exe = arch_backend();
print "Not in tree, try '$exe init-tree'\n";
my $version = Arch::Backend::arch_backend_version;
print "Using baz $version as a backend\n" if is_baz();
my $cmd = has_file_diffs_cmd()
? "file-diffs"
: "file-diff";
Arch::Util::run_tla($cmd, $filename);
like. look at that. it's giving competence π₯
π¦ DESCRIPTION π¦
so it's a lil set of helper functions, and they're made for GNU Arch related projects written in Perl. that's the whole job description.
the higher, object oriented levels of the Arch/Perl library are the ones that actually call these helpers β they use them to ask questions about the actual arch backend being used, stuff like "hey do you support this incompatible feature or not" π so these functions are basically the backend's little info desk, and everything upstairs relies on them.
π FUNCTIONS π
here's the full roster, no gatekeeping, all of them:
arch_backend, arch_backend_name, arch_backend_version, is_tla, is_baz, 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, has_cache_feature, get_cache_config, has_commit_version_arg, has_commit_files_separator, has_revlib_patch_set_dir.
and now the individual rundowns bestie, buckle up π
arch_backend [exe]β returns or sets the arch backend executable, like"/opt/bin/tla"or"baz-1.3". by default the arch backend executable comes from the environment variable$ARCH_BACKEND(or$TLA, or$BAZ). if literally no environment variable is set, then"tla"is used. so she has a fallback, she's prepared πarch_backend_nameβ returns the brand name of the arch backend, so either"tla"or"baz". yes it's a name reveal moment.arch_backend_versionβ returns the arch backend version, like"1.3.1". slay.is_tlaβ returns true ifarch_backend_nameis"tla".is_bazβ returns true ifarch_backend_nameis"baz". the two of them are lowkey in competition, we don't pick sides π«Άhas_archive_setup_cmdβ returns true if the arch backend has the"archive-setup"command. baz removed this command. riparchive-setup, you were iconic πhas_file_diffs_cmdβ returns true if the arch backend has the"file-diffs"command. it was renamed to"file-diff"in tla-1.3. the way that names keep changing, I can't πhas_register_archive_name_argβ returns 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. so like, it worked but did nothing, which is honestly so real of it πhas_tree_version_dir_optβ returns true if the arch backend's"tree-version"command supports-doptions. this is true for baz. bestie loves a-d.has_tree_id_cmdβ returns true if the arch backend has the"tree-id"command. this is true for baz.has_set_tree_version_cmdβ returns true if the arch backend has the"set-tree-version"command. baz removed this command and merged it into"tree-version". consolidation era β¨has_cache_featureβ returns true if the arch backend supports the Arch Cache feature. this is true for baz.get_cache_configβ returns a hash with the following keys:dirβ directory of the local cache (orundefif not applicable). so if it's not applicable you getundef, not a crash, which is very demure, very mindful πhas_commit_version_argβ returns true if the arch backend's"commit"command supports version argument. baz-1.4 removed this functionality. </3has_commit_files_separatorβ returns true if the arch backend's"commit"command requires"--"argument to separate files. baz-1.4 removed this separator. the--was a whole era fr fr.has_revlib_patch_set_dirβ returns true if the arch backend's creates,,patch-setsubdirectory in revision library. baz-1.4 removed this functionality. she's messy but she's trying.
π BUGS π
okay so. this module uses heuristics and does not (intend to) provide the perfect information. requires constant updating.
so like, it guesses, and it's honest about guessing, and you have to keep feeding it updates forever. not me relating to this on a spiritual level π but also please update it, bestie.
π§ AUTHORS π§
Mikhael Goikhman (migo@homemail.com--Perl-GPL/arch-perl--devel).
β SEE ALSO β
for more information, see tla, baz, Arch. iykyk π
and that's the whole thing babes β this page is perl v5.20.2, dated 2005-10-23, so shoutout to the archivists keeping the receipts, periodt π
πβ¨
π¦ where this page comes from
- ubuntu jammy: libarch-perl 0.5.2-2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms