Skip Menu |

This queue is for tickets about the Class-Unload CPAN distribution.

Report information
The Basics
Id: 122048
Status: resolved
Priority: 0/
Queue: Class-Unload

People
Owner: Nobody in particular
Requestors: joseluis.martinez [...] capside.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.11



Subject: Class::Unload support for Moose
Date: Thu, 8 Jun 2017 07:59:44 +0000
To: "bug-Class-Unload [...] rt.cpan.org" <bug-Class-Unload [...] rt.cpan.org>
From: Jose Luis Martínez Torres <joseluis.martinez [...] capside.com>
Hi, I've ran into a problem in Paws' 01_load.t test case (https://github.com/pplu/aws-sdk-perl/blob/master/t/01_load.t): It tries to load a lot of classes (~8000), and then uses Class::Unload to unload them (they are not necessary during the whole execution of the test, and if left loaded, end up consuming lots of memory). Although I started using Class::Unload some time ago, memory usage is still and issue during the test. I've just realized that Moose stores metainformation about classes in its MOP. Adding remove_metaclass_by_name (https://github.com/pplu/aws-sdk-perl/commit/f530af1140bacb51375d438744893c56208b04d0) has helped solve the issue. Adding an instruction to tell the MOP to remove the metaclass seems like a nice feature to consider for Class::Unload. I've looked around a bit, and some downstream modules seem to have realized the fact too. The way Class::Refresh does it seems like an elegant way to do it without adding Moose to Class::Unload: https://metacpan.org/source/DOY/Class-Refresh-0.07/lib/Class/Refresh.pm#L129 Would you consider this to be a good feature for Class::Unload? Best Regards, Jose Luis Martinez JLMARTIN on CPAN
Hi Jose, Thanks for the suggestion, I've implemented it in 0.10-TRIAL, now on CPAN: https://metacpan.org/release/ILMARI/Class-Unload-0.10-TRIAL If you can test that it does the right thing for you I'll do a non-TRIAL release shortly. - ilmari
Subject: RE: [rt.cpan.org #122048] Class::Unload support for Moose
Date: Fri, 9 Jun 2017 08:06:21 +0000
To: "bug-Class-Unload [...] rt.cpan.org" <bug-Class-Unload [...] rt.cpan.org>
From: Jose Luis Martínez Torres <joseluis.martinez [...] capside.com>
Hi, The trial version works for me! Thanks for the fast response :) Jose Luis Martinez JLMARTIN on CPAN
Now uploaded as the non-trial 0.11. Sorry about the delay. - ilmari