Task::Weaken

Ensure that a platform has weaken support

Latest version: 1.06 registry icon
Maintenance score
0
Safety score
0
Popularity score
3
Check your open source dependency risks. Get immediate insight about security, stability and licensing risks.
Security
  Vulnerabilities
Version Suggest Low Medium High Critical
1.06 0 0 0 0 0
1.05 0 0 0 0 0

Stability
Latest release:

1.06 - This version may not be safe as it has not been updated for a long time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform

Licensing

Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.

Artistic-1.0   -   Artistic License 1.0

Not a wildcard

Not proprietary

OSI Compliant


GPL-1.0-or-later   -   GNU General Public License v1.0 or later

Not a wildcard

Not proprietary

OSI Compliant



=pod

=head1 NAME

Task::Weaken - Ensure that a platform has weaken support

=head1 VERSION

version 1.06

=head1 DESCRIPTION

One recurring problem in modules that use LScalar::Util's C function is that it is not present in the pure-perl variant.

While this isn't necessarily always a problem in a straight CPAN-based Perl environment, some operating system distributions only include the pure-Perl versions, don't include the XS version, and so weaken is then "missing" from the platform, B passing a dependency on LScalar::Util successfully.

Most notably this is RedHat Linux at time of writing, but other come and go and do the same thing, hence "recurring problem".

The normal solution is to manually write tests in each distribution to ensure that C is available.

This restores the functionality testing to a dependency you do once in your F<Makefile.PL>, rather than something you have to write extra tests for each time you write a module.

It should also help make the package auto-generators for the various operating systems play more nicely, because it introduces a dependency that they B to have a proper weaken in order to work.

=head2 How this Task works

Part of the problem seems to stem from the fact that some distributions continue to include modules even if they fail some of their tests.

To get around that for this module, it will do a few dirty tricks.

If LScalar::Util is not available at all, it will issue a normal dependency on the module. However, if LScalar::Util is relatively new ( it is E= 1.19 ) and the module does B have weaken, the install will bail out altogether with a long error encouraging the user to seek support from their vendor (this problem happens most often in vendor-packaged Perl versions).

This distribution also contains tests to ensure that weaken is available using more normal methods.

So if your module uses C, you can just add the following to your LModule::Install-based F<Makefile.PL> (or equivalent).

requires 'Task::Weaken' => 0;

=head1 SUPPORT

Bugs should be always be reported via the CPAN bug tracker at

Lhttp://rt.cpan.org/NoAuth/ReportBug.html?Queue=Task-Weaken

For other issues,contact the author.

=head1 AUTHOR

Adam Kennedy Eadamk@cpan.orgE

=head1 SEE ALSO

L, LScalar::Util, Lhttp://ali.as/

=head1 COPYRIGHT

Copyright 2006 - 2011 Adam Kennedy.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.

=cut