Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/grinnz/extutils-makemaker-attributes

ExtUtils::MakeMaker::Attributes - Determine when ExtUtils::MakeMaker attributes are available
https://github.com/grinnz/extutils-makemaker-attributes

Last synced: 5 days ago
JSON representation

ExtUtils::MakeMaker::Attributes - Determine when ExtUtils::MakeMaker attributes are available

Awesome Lists containing this project

README

        

=pod

=head1 NAME

ExtUtils::MakeMaker::Attributes - Determine when ExtUtils::MakeMaker attributes
are available

=head1 SYNOPSIS

use ExtUtils::MakeMaker::Attributes ':all';

my @eumm_available = eumm_version_supported_attributes(ExtUtils::MakeMaker->VERSION);
my @core_available = perl_version_supported_attributes($]);

unless (perl_version_supports_attribute('v5.10.1', 'TEST_REQUIRES')) {
...
}

my $fallback = eumm_attribute_fallback('TEST_REQUIRES');
my $required_eumm = eumm_attribute_requires_version('TEST_REQUIRES');
unless (eval { ExtUtils::MakeMaker->VERSION($required_eumm); 1 }) {
...
}

=head1 DESCRIPTION

This module provides an API to determine what attributes are available to a
particular version of L, and conversely, what version of
L is required for a particular attribute. See
L for more details on
the available attributes.

=head1 FUNCTIONS

All functions are exported on demand, and can be exported individually or via
the C<:all> tag.

=head2 known_eumm_attributes

my @attributes = known_eumm_attributes;

Returns a list of attributes known to be accepted by the latest version of
L.

=head2 is_known_eumm_attribute

my $boolean = is_known_eumm_attribute($attribute);

Returns a boolean whether the attribute is known to be accepted by the latest
version of L.

=head2 eumm_attribute_requires_version

my $version = eumm_attribute_requires_version($attribute);

Returns the minimum version of L that accepts the
attribute.

=head2 eumm_attribute_fallback

my $hashref = eumm_attribute_fallback($attribute);

In cases where the active version of L does not support an
attribute, the attribute should be deleted from the options passed to
C. However, some attributes may still be useful in other ways,
as indicated by this function. If the attribute has an associated fallback
method, it returns a hashref containing a C and possibly other related
keys. Otherwise, it returns C. Currently it may return these methods:

=over 2

=item merge_prereqs

The key's contents (as a hashref of prerequisites) should be merged into the
C (returned in the fallback hashref), ideally using
L.

=back

=head2 eumm_version_supports_attribute

my $boolean = eumm_version_supports_attribute($attribute, $eumm_version);

Returns a boolean whether the L supports the attribute at
the specified version.

=head2 perl_version_supports_attribute

my $boolean = perl_version_supports_attribute($attribute, $perl_version);

Returns a boolean whether the version of L shipped in the
specified version of Perl supports the attribute.

=head2 eumm_version_supported_attributes

my @attributes = eumm_version_supported_attributes($eumm_version);

Returns a list of all attributes supported by the specified version of
L.

=head2 perl_version_supported_attributes

my @attributes = perl_version_supported_attributes($perl_version);

Returns a list of all attributes supported by the version of
L shipped in the specified version of Perl.

=head1 BUGS

Report any issues on the public bugtracker.

=head1 AUTHOR

Dan Book

=head1 COPYRIGHT AND LICENSE

This software is Copyright (c) 2017 by Dan Book.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)

=head1 SEE ALSO

L

=cut