Artur Bergman > Devel-GC-Helper-0.25 > Devel::GC::Helper

Download:
Devel-GC-Helper-0.25.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  3
Open  0
View/Report Bugs
Module Version: 0.25   Source  

NAME ^

Devel::GC::Helper - Perl extension for finding unused variables

SYNOPSIS ^

  use Devel::GC::Helper;
  my $leaks = Devel::GC::Helper::sweep;
  foreach my $leak (@$leaks) {
      print "Leaked $leak";
  }

DESCRIPTION ^

This module walks the entire perl space, from main:: and notes what it has found, then it walks all SVs that are active and tells you which ones are potential leaks.

EXPORT

None by default.

sweep()

Returns an arrayref of references to all containers that it didn't find in the mark phase.

SEE ALSO ^

This module can be used together with Devel::Cycle to find where there is a leak.

You can trac the repository at http://code.sixapart.com/trac/Devel-GC-Helper/

BUGS ^

Will only work in threaded perl correctly, it won't find regular expressions in non threaded perl because it is not walking the op tree. Nor will it find constants.

Leaked regular expressions won't be reported, because I can't figure out how to tell if they are active or not, I also haven't looked closely at it since I don't have much of a problem with leaking regexen.

There are three variables, tvo magic elements and one array that I have not tracked down where they come from that are always reported as leaked. I suspect they are from within DynaLoader/Exporter.

AUTHOR ^

Artur Bergman, <sky@crucially.net>

COPYRIGHT AND LICENSE ^

Copyright (C) 2006 by Artur Bergman

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: