4 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD %EXPORT_TAGS);
9 @ISA = qw(Exporter DynaLoader);
11 # Items to export into callers namespace by default. Note: do not export
12 # names by default without a very good reason. Use EXPORT_OK instead.
13 # Do not simply export all your public functions/methods/constants.
15 # This allows declaration use Devel::Size ':all';
16 # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
18 %EXPORT_TAGS = ( 'all' => [ qw(
22 @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
29 bootstrap Devel::Size $VERSION;
31 # Preloaded methods go here.
35 # Below is stub documentation for your module. You better edit it!
39 Devel::Size - Perl extension for finding the memory usage of perl variables
43 use Devel::Size qw(size);
44 $size = size("abcde");
45 $other_size = size(\@foo);
49 This module figures out the real sizes of perl variables. Call it with
50 a reference to the variable you want the size of. If you pass in a
51 plain scalar it returns the size of that scalar. (Just be careful if
52 you're asking for the size of a reference, as it'll follow the
53 reference if you don't reference it first)
61 Only does plain scalars, hashes, and arrays. No sizes for globs or code refs. Yet.
63 Also, this module currently only returns the size used by the variable
64 itself, I<not> the contents of arrays or hashes, nor does it follow
65 references past one level. That's for later.
69 Dan Sugalski dan@sidhe.org