Arch::Storage(3pm) | User Contributed Perl Documentation | Arch::Storage(3pm) |
Arch::Storage - abstract class to access arch archives
use base 'Arch::Storage'; # see synopsis of concrete classes
Arch::Storage provides some common methods to query content of arch archive.
The methods usually return arrayref if not otherwise specified, and are not affected by the list context (except for working_names).
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.
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 mixing new and instance constructors 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 use instance method in the code (singleton pattern), or alternatively create a temporary new object before calling methods of other classes that internally use instance to work with this subclass.
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 Arch::Name instance, and this is what is returned. Note that this object behaves as fully qualified name in string context.
This method is provided for convenience and backward compatibility only. You may as well use working_name instead, just enclose the argument list into arrayref, and call to_array on the returned object.
If given, the argument is used instead of the default working_name.
If given, the argument is used instead of the default working_name.
If given, the argument is used instead of the default working_name.
The revision hashes have the following fields:
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 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" ], ... ], ... ], ... ]
No known bugs.
Mikhael Goikhman (migo@homemail.com--Perl-GPL/arch-perl--devel).
Enno Cramer (uebergeek@web.de--2003/arch-perl--devel).
For more information, see tla, Arch::Session, Arch::Library.
2005-05-16 | perl v5.20.2 |