NAME
Devel::Size - Perl extension for finding the memory usage of perl variables
SYNOPSIS
use Devel::Size qw(size);
$size = size("abcde");
$other_size = size(\@foo);
DESCRIPTION
This module figures out the real sizes of perl variables. Call it with a reference to the variable you want the size of. If you pass in a plain scalar it returns the size of that scalar. (Just be careful if you're asking for the size of a reference, as it'll follow the reference if you don't reference it first)
EXPORT
None by default.
BUGS
Doesn't currently walk all the bits for code refs, globs, formats, and IO. Those throw a warning, but a minimum size for them is returned.
Also, this module currently only returns the size used by the variable itself, not the contents of arrays or hashes, nor does it follow references past one level. That's for later.
AUTHOR
Dan Sugalski dan@sidhe.org
SEE ALSO
perl(1).