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::Signature representing 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::Tag object for annotated tags, or
  • a Git::Raw::Reference for 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 🫢


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