Types::Git - Type::Tiny types for git stuff.
package Foo; use Types::Git -types; use Moo; use strictures 1; use namespace::clean; has ref => ( is => 'ro', isa => GitRef, );
This module provides several Type::Tiny types for some of git's data types.
A SHA1 hex, must be 40 characters or less long and contain only hex characters.
Just like "GitRef" except one-level refs (those without any forward slashes) are allowed. This is useful for validating a branch or tag name.
Matches a ref against the same rules that git-check-ref-format uses.
A "GitRef" which begins with refs/heads/ and ends with a "GitLooseRef".
refs/heads/
A "GitRef" which begins with refs/tags/ and ends with a "GitLooseRef".
refs/tags/
This is a union type of "GitSHA" and "GitLooseRef". In the future this type may be expanded to include other types as more of gitrevisions is incorporated with this module.
Currenlty this is an alias for "GitObject" but may be extended in the future to include other types as more of gitrevisions is incorporated with this module.
This type is meant to be the same as "GitObject" except with extended rules for date ranges and such.
Aran Clary Deltac <bluefeet@gmail.com>
Thanks to ZipRecruiter for encouraging their employees to contribute back to the open source ecosystem. Without their dedication to quality software development this distribution would not exist.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Types::Git, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Types::Git
CPAN shell
perl -MCPAN -e shell install Types::Git
For more information on module installation, please visit the detailed CPAN module installation guide.