Arch::Storage(3pm)
β¨ Arch::Storage β¨
okay bestie, welcome to Arch::Storage(3pm) β that's the User Contributed Perl Documentation version, and yes it's giving vintage 2005 but we love her anyway π
πΈ NAME πΈ
Arch::Storage β an abstract class to access arch archives. no cap, that's literally her whole job description.
π SYNOPSIS π
use base 'Arch::Storage';
# see synopsis of concrete classes
so like, you don't instantiate her, she's abstract, she's the blueprint π go look at the concrete classes for the real tea.
π¦ DESCRIPTION π¦
Arch::Storage hands out some common methods for querying the content of an arch archive. she's the mom friend of the class hierarchy.
The methods usually return an arrayref unless it says otherwise, and they are not affected by list context β except for working_names, who is the one exception, main character behavior honestly β¨
π METHODS π
The following (implemented and pure virtual) methods are common to subclasses:
new, init, working_name, working_names, fixup_name_alias, is_archive_managed, expanded_revisions.
archives, categories, branches, versions, revisions, get_revision_descs, expanded_archive_info, get_revision_changeset, get_changeset, get_revision_log, get_log.
β new [%args]
Create a new instance of the concrete subclass (i.e. Arch::Session or Arch::Library). fresh out the box, brand new, iconic π«Ά
β instance
Alternative constructor. Returns the last created instance of the concrete subclass (i.e. Arch::Session or Arch::Library) β or makes a new one if there isn't one yet.
The purpose of this alternative constructor is to allow the singleton behaviour as well as certain Aspect Oriented Programming practices.
Theoretical note: this design is acceptably good, and mixingnewandinstanceconstructors in the code usually does what is intended. However, if someone actually creates more than one object of any subclass, he has two choices to enforce correctness. Either only useinstancemethod in the code (singleton pattern), or alternatively create a temporarynewobject before calling methods of other classes that internally useinstanceto work with this subclass.
ngl that's a lot of words but it's real, bestie β multiple objects = pick one of those two paths, no third option π
β init %args
Initialize or reset the object state. factory reset energy β¨
β working_name [name]
Set or get the default working operand for other methods.
The argument may be anything that Arch::Name constructor accepts, i.e. fully qualified string, arrayref, hashref or Arch::Name instance. If needed, name is converted to an Arch::Name instance, and that is what gets returned. Note that this object behaves as a fully qualified name in string context.
β working_names [archive ..]
Similar to working_name, but accepts and returns a list of name components, from archive to revision.
This method is provided for convenience and backward compatibility only. You may as well use working_name instead β just enclose the argument list into an arrayref, and call to_array on the returned object. iykyk π
β fixup_name_alias
Replace (if needed) the "FIRST" and "LATEST" components of the working name's version and revision with the actual values by querying the storage. she goes and finds out the truth for you π₯
β is_archive_managed [archive]
Return true or false depending on whether the archive is known to the storage.
If given, the argument is used instead of the default working_name.
β expanded_revisions
Return all revisions in all archives, each revision is an Arch::Name object. every single one. she does not gatekeep π
β archives
Return all registered (or otherwise known) archives.
β categories [archive] / branches [category] / versions [branch] / revisions [version]
Return all categories, branches, versions or revisions respectively in the immediate parent, similarly to the corresponding tla commands.
If given, the argument is used instead of the default working_name.
β get_revision_descs [version]
Return a describing hash for every revision in the version.
If given, the argument is used instead of the default working_name.
The revision hashes have the following fields:
nameβ The revision name (i.e."base-0","patch-X","version-0"or"versionfix-X") β¨summaryβ The revision's commit log's summary linecreatorβ The name part of the committer's"tla my-id"(i.e."John Hacker")emailβ The email address part of the committer's"tla my-id"(i.e."jhacker@nowhere.org")dateβ The revision's commit date in"%Y-%m-%d %H:%M:%S %Z"format (seestrftime(3))kindβ The kind of revision (i.e. one of"tag","import","cset"or"unknown")
β expanded_archive_info [archive]
Returns a tree of categories, branches and versions in the archive. The archive defaults to working_names.
Returns a reference to a list of categories. Every category is a list consisting of the category name and a list of branches. Every branch is a list consisting of the branch name and a list of versions. Every version is a list consisting of the version number and the first and last revision name.
[
[ "category1", [
[ "branch1", [
[ "version1", "first_revision1", "last_revision1" ],
[ "version2", "first_revision2", "last_revision2" ],
...
],
...
],
...
]
it's giving nested data structure realness π
β get_revision_changeset revision [dir] / get_changeset [dir]
Fetches the changeset for revision or working_name and returns an Arch::Changeset for it. If dir is specified, it will be used to store the contents of the changeset. Otherwise a new temporary directory will be created.
β get_revision_log revision / get_log
Fetch the log for the revision or working_name. Returns an Arch::Log object. π
π BUGS π
No known bugs. she's flawless, periodt π
π AUTHORS π
Mikhael Goikhman (migo@homemail.com--Perl-GPL/arch-perl--devel).
Enno Cramer (uebergeek@web.de--2003/arch-perl--devel).
π SEE ALSO π
For more information, see tla, Arch::Session, Arch::Library.
and that's the whole page bestie!! π she's documented by perl v5.20.2, dated 2005-05-16, and honestly? an icon, a legend, the moment. go query some archives, slay, and remember: abstract classes don't get instantiated π¦β¨
π¦ 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