Devel-Size README


Devel-Size documentation  | view source Contained in the Devel-Size distribution.

Index


Devel::Size - Perl extension for finding the memory usage of Perl variables

SYNOPSIS

Top

  use Devel::Size qw(size total_size);

  my $size = size("A string");

  my @foo = (1, 2, 3, 4, 5);
  my $other_size = size(\@foo);

  my $foo = {a => [1, 2, 3],
      b => {a => [1, 3, 4]}
         };
  my $total_size = total_size($foo);

DESCRIPTION

Top

This module figures out the real size of Perl variables in bytes, as accurately as possible.

Build and Install

Top

To build and install this module, you need:

     Perl
     a working C or C++ compiler
     a make (or namke on Windows) utility

Follow these steps:

On Linux, Cygwin, or Unix:

    perl Makefile.PL
    make
    make test
    sudo make install

On Windows:

    perl Makefile.PL
    nmake
    nmake test
    nmake install

BUGREPORTS

Top

Please report bugs to:

    http://rt.cpan.org/NoAuth/Bugs.html?Dist=Devel-Size

COPYRIGHT

Top


Devel-Size documentation  | view source Contained in the Devel-Size distribution.