Chris Nandor > Devel-FindGlobals-0.03 > Devel::FindGlobals

Download:
Devel-FindGlobals-0.03.tar.gz

Dependencies

Annotate this POD

Related Modules

Scalar::Util
Devel::LeakTrace
Devel::Size
Data::Dumper
Devel::Peek
Devel::Leak
more...
By perlmonks.org

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.03   Source  

NAME ^

Devel::FindGlobals - Find global variables and their size

SYNOPSIS ^

        use Devel::FindGlobals;
        print print_globals_sizes();

DESCRIPTION ^

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:

BUGS ^

Code references, being not handled by Devel::Size, are not handled by this module.

AUTHOR ^

Chris Nandor <pudge@pobox.com>, http://pudge.net/

Copyright (c) 2002-2004 Chris Nandor. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO ^

perl(1), perlguts(1), Devel::Size.

syntax highlighting: