Git-Libgit2
view release on metacpan or search on metacpan
lib/Git/Libgit2.pm view on Meta::CPAN
C<git_error_last>); the exception stringifies to the libgit2 error message.
=head2 oid_from_hex
my $raw = oid_from_hex('39a3c8...'); # 40 hex chars
Convert a 40-character hex OID into a Perl scalar holding the raw 20 bytes
(wraps C<git_oid_fromstr>). Croaks unless the input is exactly 40 hex digits.
B<Lifetime:> the returned scalar I<is> the OID buffer â libgit2 is handed a
pointer into its PV. Keep the scalar alive for as long as any libgit2 call
still needs the OID.
=head2 oid_to_hex
my $hex = oid_to_hex($oid_ptr);
Convert a C<git_oid> pointer into its 40-character hex string (wraps
C<git_oid_tostr>).
=head1 EXPORTS
( run in 2.600 seconds using v1.01-cache-2.11-cpan-14f38c9f855 )