Git::Raw::Tag(3pm)
π Git::Raw::Tag π
okay bestie, so this is Git::Raw::Tag β the Git tag class from the User Contributed Perl Documentation corner of the universe. it's literally the way Perl talks to annotated Git tags. no cap. π
β¨ VERSION β¨
version 0.90 β that's the one you're reading rn π¦
πΈ SYNOPSIS πΈ
ok so here's the whole vibe, copy-paste energy:
use Git::Raw;
# open the Git repository at $path
my $repo = Git::Raw::Repository -> open($path);
# retrieve user's name and email from the Git configuration
my $config = $repo -> config;
my $name = $config -> str('user.name');
my $email = $config -> str('user.email');
# create a new Git signature
my $me = Git::Raw::Signature -> now($name, $email);
# create a new tag
my $tag = $repo -> tag(
'v0.1', 'Initial version', $me, $repo -> head -> target
);
likeβ¦ open the repo, grab your user.name and user.email out of the Git config, build a signature, boom β tag created. slay. π
π DESCRIPTION π
a Git::Raw::Tag represents an annotated Git tag. that's its whole job and it does it beautifully fr fr π
β οΈ WARNING: the API of this module is unstable and may change without warning. (any change will be appropriately documented in the changelog, so breathe, bestie π)
π METHODS π
π¦ create( $repo, $name, $msg, $tagger, $target )
create a new annotated tag, given:
- a _name_
- a _message_ (
$msg) - a
Git::Raw::Signaturerepresenting the _tagger_ - a _target_ object
π lookup( $repo, $id )
get the tag that corresponds to $id. this one is pretty much the same as $repo->lookup($id) except it only returns tags. and if the tag doesn't exist? it returns undef. tragic but honest π
πΈ owner( )
retrieve the Git::Raw::Repository that owns the tag. it's giving "who's your parent" energy π
β foreach( $repo, $callback, [$type] )
run $callback for every tag in the repo. the callback receives a tag object, which will either be:
- a
Git::Raw::Tagobject for annotated tags, or - a
Git::Raw::Referencefor lightweight tags
$type may be "all", "annotated" or "lightweight". if $type is not specified or is undef, all tags get returned.
π₯ heads up: a non-zero return value stops the loop. periodt.
π delete( )
delete the tag.
π careful bestie: the Git::Raw::Tag object must not be accessed afterwards. like, it's gone gone. no take-backs.
β¨ id( )
retrieve the id of the tag, as a string π
π name( )
retrieve the name of the tag. iconic.
π message( )
retrieve the message of the tag. the lil love letter inside π₯Ί
π§ tagger( )
retrieve the Git::Raw::Signature representing the tag's tagger. and if there's no tagger? undef will be returned. main character not found energy π
π target( )
retrieve the target object of the tag. it points at things. that's the whole vibe.
π AUTHOR π
- Alessandro Ghedini <alexbio@cpan.org>
- Jacques Germishuys <jacquesg@cpan.org>
legends, honestly π«Ά
π LICENSE AND COPYRIGHT π
Copyright 2012 Alessandro Ghedini.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
and that's the whole page bestie!! π this was perl v5.42.3, dated 2026-08-19, straight from Git::Raw::Tag(3pm) β go forth and tag ur commits, you absolute icon πβ¨
π¦ where this page comes from
- ubuntu stonking: libgit-raw-perl 0.90+ds-3build3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms