No need to explicitly check AvARYLEN in 5.10 and later.
[p5sagit/Devel-Size.git] / README
CommitLineData
5a83b7cf 1=pod
2
3Devel::Size - Perl extension for finding the memory usage of Perl variables
4
5=head1 SYNOPSIS
6
7 use Devel::Size qw(size total_size);
8
9 my $size = size("A string");
10
11 my @foo = (1, 2, 3, 4, 5);
12 my $other_size = size(\@foo);
13
14 my $foo = {a => [1, 2, 3],
9fc9ab86 15 b => {a => [1, 3, 4]}
5a83b7cf 16 };
17 my $total_size = total_size($foo);
18
19=head1 DESCRIPTION
20
21This module figures out the real size of Perl variables in bytes, as
22accurately as possible.
23
24=head1 Build and Install
25
26To build and install this module, you need:
27
9fc9ab86 28 Perl
29 a working C or C++ compiler
30 a make (or namke on Windows) utility
5a83b7cf 31
32Follow these steps:
33
34On Linux, Cygwin, or Unix:
35
9fc9ab86 36 perl Makefile.PL
37 make
38 make test
39 sudo make install
40
41On most systems, it is necessary to link to libstdc++. On such systems,
42libstdc++ should be found automatically (by default).
43If libstdc++ is *not* being found automatically (in which case you'll get
44link errors),then instead of running 'perl Makefile.PL', you'll need to run:
45
46 perl Makefile.pl LIBS="-L/path/to/libstdc++ -lstdc++"
5a83b7cf 47
48On Windows:
49
9fc9ab86 50 perl Makefile.PL
51 nmake
52 nmake test
53 nmake install
5a83b7cf 54
55=head1 BUGREPORTS
56
57Please report bugs to:
58
9fc9ab86 59 http://rt.cpan.org/NoAuth/Bugs.html?Dist=Devel-Size
5a83b7cf 60
61=head1 COPYRIGHT
62
b7621729 63Copyright (C) 2005 Dan Sugalski, Copyright (C) 2007-2008 Tels
5a83b7cf 64
65This module is free software; you can redistribute it and/or modify it
66under the same terms as Perl v5.8.8.
67
68=cut