# # spec file for package perl-Devel-Leak-Object # # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: perl-Devel-Leak-Object Version: 1.01 Release: 0 %define cpan_name Devel-Leak-Object Summary: Detect leaks of objects License: Artistic-1.0 or GPL-1.0+ Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/Devel-Leak-Object/ Source0: Devel-Leak-Object-1.01.tar.gz BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(Scalar::Util) >= 1.19 Requires: perl(Scalar::Util) >= 1.19 %{perl_requires} %description This module provides tracking of objects, for the purpose of detecting memory leaks due to circular references or innappropriate caching schemes. Object tracking can be enabled on a per object basis. Any objects thus tracked are remembered until DESTROYed; details of any objects left are printed out to STDERR at END-time. use Devel::Leak::Object qw(GLOBAL_bless); This form overloads *bless* to track construction and destruction of all objects. As an alternative, by importing bless, you can just track the objects of the caller code that is doing the use. If you use GLOBAL_bless to overload the bless function, please note that it will ONLY apply to bless for modules loaded AFTER Devel::Leak::Object has enabled the hook. Any modules already loaded will have already bound to CORE::bless and will not be impacted. Setting the global variable $Devel::Leak::Object::TRACKSOURCELINES makes the report at the end include where (filename and line number) each leaked object originates (or where call to the ::new is made). %prep %setup -q -n %{cpan_name}-%{version} %build %{__perl} Makefile.PL INSTALLDIRS=vendor %{__make} %{?_smp_mflags} %check %{__make} test %install %perl_make_install %perl_process_packlist %perl_gen_filelist %files -f %{name}.files %defattr(-,root,root,755) %doc Changes LICENSE README %changelog