Perl Diver 2.31
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

Task::Weaken

Name Task::Weaken
Version 1.06
Located at /usr/local/share/perl5
File /usr/local/share/perl5/Task/Weaken.pm
Is Core No
Search CPAN for this module Task::Weaken
Documentation Task::Weaken
Module Details Task::Weaken


NAME

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


VERSION

version 1.06


DESCRIPTION

One recurring problem in modules that use the Scalar::Util manpage's weaken 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, despite passing a dependency on the Scalar::Util manpage 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 weaken is available.

This restores the functionality testing to a dependency you do once in your 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 have to have a proper weaken in order to work.

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 the Scalar::Util manpage is not available at all, it will issue a normal dependency on the module. However, if the Scalar::Util manpage is relatively new ( it is >= 1.19 ) and the module does not 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 weaken, you can just add the following to your the Module::Install manpage-based Makefile.PL (or equivalent).

  requires 'Task::Weaken' => 0;


SUPPORT

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

http://rt.cpan.org/NoAuth/ReportBug.html

For other issues,contact the author.


AUTHOR

Adam Kennedy <adamk@cpan.org>


SEE ALSO

Task, the Scalar::Util manpage, http://ali.as/


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.

Perl Diver brought to you by ScriptSolutions.com © 1997- 2024