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