Devel::FindGlobals is a Perl module to find global variables and their size.
SYNOPSIS
use Devel::FindGlobals;
print print_globals_sizes();
This module just runs around and over the symbol table, finds global variables, gets their sizes with Devel::Size, and then prints them out.
find_globals() just finds the globals (and returns a hashref), and find_globals_sizes() returns the globals and the sizes in a hashref. print_globals_sizes() prints out that data in a pretty table.
find_globals() hashref is of the form $hash->{TYPE}{NAME}, where TYPE is SCALAR, ARRAY, HASH (types stored in @Devel::FindGlobals::TYPES).
find_globals_sizes() hashref is the same, except that the value of the record is not 1 but an arrayref of size and total_size (size is the size of the variable itself, and total_size counts up all the other members of the variable, for arrayrefs and hashrefs).
print_globals_sizes() accepts an OPTIONS hash. Currently recognized options are:
ignore_files
Ignore file globals (like $main::_ for lexical variables to include in the report.
Product's homepage
Requirements:
· Perl