.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "Task::Weaken 3pm" .TH Task::Weaken 3pm "2018-05-11" "perl v5.26.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Task::Weaken \- Ensure that a platform has weaken support .SH "VERSION" .IX Header "VERSION" version 1.06 .SH "DESCRIPTION" .IX Header "DESCRIPTION" One recurring problem in modules that use Scalar::Util's \f(CW\*(C`weaken\*(C'\fR function is that it is not present in the pure-perl variant. .PP 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 \s-1XS\s0 version, and so weaken is then \*(L"missing\*(R" from the platform, \fBdespite\fR passing a dependency on Scalar::Util successfully. .PP Most notably this is RedHat Linux at time of writing, but other come and go and do the same thing, hence \*(L"recurring problem\*(R". .PP The normal solution is to manually write tests in each distribution to ensure that \f(CW\*(C`weaken\*(C'\fR is available. .PP This restores the functionality testing to a dependency you do once in your \fIMakefile.PL\fR, rather than something you have to write extra tests for each time you write a module. .PP It should also help make the package auto-generators for the various operating systems play more nicely, because it introduces a dependency that they \fBhave\fR to have a proper weaken in order to work. .SS "How this Task works" .IX Subsection "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. .PP To get around that for this module, it will do a few dirty tricks. .PP If Scalar::Util is not available at all, it will issue a normal dependency on the module. However, if Scalar::Util is relatively new ( it is >= 1.19 ) and the module does \fBnot\fR 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). .PP This distribution also contains tests to ensure that weaken is available using more normal methods. .PP So if your module uses \f(CW\*(C`weaken\*(C'\fR, you can just add the following to your Module::Install\-based \fIMakefile.PL\fR (or equivalent). .PP .Vb 1 \& requires \*(AqTask::Weaken\*(Aq => 0; .Ve .SH "SUPPORT" .IX Header "SUPPORT" Bugs should be always be reported via the \s-1CPAN\s0 bug tracker at .PP .PP For other issues,contact the author. .SH "AUTHOR" .IX Header "AUTHOR" Adam Kennedy .SH "SEE ALSO" .IX Header "SEE ALSO" Task, Scalar::Util, .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright 2006 \- 2011 Adam Kennedy. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .PP The full text of the license can be found in the \&\s-1LICENSE\s0 file included with this module.