Why not adopt me?
NAME
Git::Wrapper::Plus::Support - Determine what versions of things support what
VERSION
version 0.004011
SYNOPSIS
use Git::Wrapper::Plus::Support;
my $support = Git::Wrapper::Plus::Support->new(
git => <git::wrapper>
);
if ( $support->supports_command( 'for-each-ref' ) ) {
}
if ( $support->supports_behavior('add-updates-index') ) {
}
METHODS
supports_command
Determines if a given command is supported on the current git.
This works by using a hand-coded table for interesting values by processing git log
for git itself.
Returns undef
if the status of a command is unknown ( that is, has not been added to the map yet ), 0
if it is not supported, and 1
if it is.
if ( $supporter->supports_command('for-each-ref') ) ) {
...
} else {
...
}
See ::Support::Commands
for details.
supports_behavior
Indicates if a given command behaves in a certain way
This works by using a hand-coded table for interesting values by processing git log
for git itself.
Returns undef
if the status of a commands behavior is unknown ( that is, has not been added to the map yet ), 0
if it is not supported, and 1
if it is.
if ( $supporter->supports_behavior('add-updates-index') ) ) {
...
} else {
...
}
See ::Support::Behaviors
for details.
supports_argument
Indicates if a given command accepts a specific argument.
This works by using a hand-coded table for interesting values by processing git log
for git itself.
Returns undef
if the status of a commands argument is unknown ( that is, has not been added to the map yet ), 0
if it is not supported, and 1
if it is.
if ( $supporter->supports_argument('cat-file','-e') ) ) {
...
} else {
...
}
See ::Support::Arguments
for details.
ATTRIBUTES
git
versions
commands
This attribute contains a ::Support::Commands
object for data on git command support.
behaviors
This attribute contains a ::Support::Behaviors
object for data on git command behavior support.
arguments
This attribute contains a ::Support::Arguments
object for data on git command argument support.
AUTHOR
Kent Fredric <kentnl@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2017 by Kent Fredric <kentfredric@gmail.com>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.