Arch::Log(3pm)
π Arch::Log β the class that's literally the Arch patch-log, bestie π
okay so real quick, this is Arch::Log, from the User Contributed Perl Documentation corner of the manual-verse, and it is exactly what it sounds like: a class that represents the Arch patch-log concept. she's giving "I hold one patch log and I know things about it" and honestly? iconic. π
β¨ SYNOPSIS β¨
use Arch::Log;
my $log = Arch::Log->new($rfc2822_message_string);
printf "Patch log date: %s\n", $log->header('standard_date');
print $log->dump;
my $first_new_file = $log->get_headers->{new_files}->[0];
like, that's it. that's the whole vibe check. you hand her a string, she hands you a whole patch log back. π¦
πΈ DESCRIPTION πΈ
This class represents the patch-log concept in Arch and provides some useful methods. no cap, that's the whole job. she's a patch-log girlie and she's good at it. π
π METHODS π
The following class methods are available:
get_message, get_headers, header, get_changes, split_version, get_version, get_revision, get_revision_kind, get_revision_desc, dump.
that's the whole roster, bestie. now let's meet each one π
get_messageβ returns the original message, the exact one the object was constructed with. she kept the receipt. π§Ύget_headersβ returns the hashref of all the headers, body included. also see theheadermethod if you want the β¨spotlightβ¨ version.headernameheadername [new_value] β get or set the named header. and ooh, the special name'body'represents the message body β aka the text that comes after the headers. π«Άbody[new_value]existing_header_name[new_value] β this is just a shortcut for"header"('method'). but β and this is the important part β unlike"header"('method'), thismethodfails instead of returningundefif the log doesn't have the given header name. so if the header isn't there, she's not gonna quietly hand you aundefand let you find out later. she's gonna say something. πget_changesβ returns a list of changes in the corresponding changeset.
β οΈ ATTENTION! Patch logs do not distinguish metadata (ie permission) changes from ordinary content changes. Permission changes will be represented with a change type of'M'. This is different fromArch::Changeset::get_changesandArch::Tree::get_changes. so don't come for her when your permission change shows up as'M', that's just how patch logs do. π
split_versionβ returns a list of 2 strings: the full version and the patch-level. two for one, we love a bundle deal. πget_versionβ returns the full version name, not unlikesplit_version. same energy, one string. βget_revisionβ returns the full revision name. this is currently a concatenation of headersArchiveandRevisionwith a/separator. yes, currently. she said don't get attached. πget_revision_kindβ returns one of the strings'tag','import'or'cset', depending on the revision kind this log represents. pick your fighter. π₯get_revision_descβ returns a revision description hashref with the keys:name,version,summary,creator,email,date,kind. seven keys, all accounted for, no notes. πdumpβ returns the object dump usingData::Dumper. yes queen, show us everything. π
π BUGS π
Awaiting for your reports.
she's literally just sitting there. waiting. inbox open. π₯Ί
π«Ά AUTHORS π«Ά
Mikhael Goikhman (migo@homemail.com--Perl-GPL/arch-perl--devel).
π SEE ALSO π
For more information, see tla, Arch::Session, Arch::Library, Arch::Changes.
and that's the whole page, bestie! this was Arch::Log from the User Contributed Perl Documentation section, brought to you by perl v5.20.2, dated 2005-11-14. she's been serving patch-log realness since 2005 and she has not missed once. 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