Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

task::weaken(3) [osx man page]

Task::Weaken(3) 					User Contributed Perl Documentation					   Task::Weaken(3)

NAME
Task::Weaken - Ensure that a platform has weaken support DESCRIPTION
One recurring problem in modules that use Scalar::Util's "weaken" function is that it is not present in the pure-perl variant. While this isn't necesarily 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 Scalar::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 "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 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 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 Module::Install-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?Queue=Task-Weaken <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Task-Weaken> For other issues,contact the author. AUTHOR
Adam Kennedy <adamk@cpan.org> SEE ALSO
Task, Scalar::Util, <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 v5.16.2 2011-03-08 Task::Weaken(3)

Check Out this Related Man Page

Cycle(3pm)						User Contributed Perl Documentation						Cycle(3pm)

NAME
Test::Memory::Cycle - Check for memory leaks and circular memory references VERSION
Version 1.04 SYNOPSIS
Perl's garbage collection has one big problem: Circular references can't get cleaned up. A circular reference can be as simple as two reference that refer to each other: my $mom = { name => "Marilyn Lester", }; my $me = { name => "Andy Lester", mother => $mom, }; $mom->{son} = $me; "Test::Memory::Cycle" is built on top of "Devel::Cycle" to give you an easy way to check for these circular references. use Test::Memory::Cycle; my $object = new MyObject; # Do stuff with the object. memory_cycle_ok( $object ); You can also use "memory_cycle_exists()" to make sure that you have a cycle where you expect to have one. FUNCTIONS
"memory_cycle_ok( $reference, $msg )" Checks that $reference doesn't have any circular memory references. "memory_cycle_exists( $reference, $msg )" Checks that $reference does have any circular memory references. "weakened_memory_cycle_ok( $reference, $msg )" Checks that $reference doesn't have any circular memory references, but unlike "memory_cycle_ok" this will also check for weakened cycles produced with Scalar::Util's "weaken". "weakened_memory_cycle_exists( $reference, $msg )" Checks that $reference does have any circular memory references, but unlike "memory_cycle_exists" this will also check for weakened cycles produced with Scalar::Util's "weaken". AUTHOR
Written by Andy Lester, "<andy @ petdance.com>". BUGS
Please report any bugs or feature requests to "bug-test-memory-cycle at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Memory-Cycle>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. SUPPORT
You can find documentation for this module with the perldoc command. perldoc Test::Memory::Cycle You can also look for information at: o AnnoCPAN: Annotated CPAN documentation <http://annocpan.org/dist/Test-Memory-Cycle> o CPAN Ratings <http://cpanratings.perl.org/d/Test-Memory-Cycle> o RT: CPAN's request tracker <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test-Memory-Cycle> o Search CPAN <http://search.cpan.org/dist/Test-Memory-Cycle> ACKNOWLEDGEMENTS
Thanks to the contributions of Stevan Little, and to Lincoln Stein for writing Devel::Cycle. COPYRIGHT
Copyright 2006, Andy Lester, All Rights Reserved. You may use, modify, and distribute this package under the same terms as Perl itself. perl v5.10.0 2006-08-07 Cycle(3pm)
Man Page