Name : perl-Test-Refcount
| |
Version : 0.10
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp156.1.1
| Date : 2024-07-03 19:05:41
|
Group : Development/Libraries/Perl
| Source RPM : perl-Test-Refcount-0.10-lp156.1.1.src.rpm
|
Size : 0.04 MB
| |
Packager : https://www_suse_com/
| |
Summary : Assert reference counts on objects
|
Description :
The Perl garbage collector uses simple reference counting during the normal execution of a program. This means that cycles or unweakened references in other parts of code can keep an object around for longer than intended. To help avoid this problem, the reference count of a new object from its class constructor ought to be 1. This way, the caller can know the object will be properly DESTROYed when it drops all of its references to it.
This module provides two test functions to help ensure this property holds for an object class, so as to be polite to its callers.
If the assertion fails; that is, if the actual reference count is different to what was expected, either of the following two modules may be used to assist the developer in finding where the references are.
* If Devel::MAT is installed, this test module will use it to dump the state of the memory after a failure. It will create a _.pmat_ file named the same as the unit test, but with the trailing _.t_ suffix replaced with _-TEST.pmat_ where \'TEST\' is the number of the test that failed (in case there was more than one).
* If Devel::FindRef module is installed, a reverse-references trace is printed to the test output.
See the examples below for more information.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-T/15.6/noarch |