NAME
Git::Native::Signature - A Git author/committer signature
VERSION
version 0.005
SYNOPSIS
my $sig = Git::Native::Signature->new(
name => 'Test',
email => 'test@example.invalid',
when => time,
offset => 0,
);
DESCRIPTION
A Git signature (name + email + timestamp). Wraps git_signature*; freed automatically when the object goes out of scope.
Pass one as author or committer to "commit_create" in Git::Native::Repository, or let that method fall back to "signature_default" in Git::Native::Repository, which reads user.name and user.email from the repository config.
name
The human name, e.g. 'Ada Lovelace'. Required.
The email address, without angle brackets. Required.
when
Timestamp in Unix epoch seconds. Leave it unset and the signature is stamped with the current time when its libgit2 handle is first built.
offset
Timezone offset in minutes east of UTC (120 for +0200), default 0. Recorded for display only — when is an absolute epoch either way.
from_handle
my $sig = Git::Native::Signature->from_handle($ptr);
Wraps a git_signature* that libgit2 allocated (as "signature_default" in Git::Native::Repository does) and takes ownership of it. name, email, when and offset are read out of the C struct and copied into Perl, so they stay valid after the handle is freed.
SEE ALSO
Git::Native::Repository, Git::Native::Commit
SUPPORT
Issues
Please report bugs and feature requests on GitHub at https://github.com/Getty/p5-git-native/issues.
CONTRIBUTING
Contributions are welcome! Please fork the repository and submit a pull request.
AUTHOR
Torsten Raudssus <getty@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2026 by Torsten Raudssus <torsten@raudssus.de> https://raudssus.de/.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.