then perl memory usage data will be written to a C<sizeme.db> file in the
current directory when the script ends.
+=head1 FUNCTIONS
+
+=head2 size
+
+ $size_in_bytes = size( $ref_to_data );
+
+Measures and returns the size of the referenced data, without including any
+other data referenced by it.
+
+=head2 total_size
+
+ $size_in_bytes = total_size( $ref_to_data );
+
+Like </size> but does include referenced data.
+
+=head2 perl_size
+
+ $size_in_bytes = perl_size();
+
+Measures and returns the size of the entire perl interpreter. This is similar
+to calling C<total_size( \%main:: )> but also includes all the perl internals.
+
+=head2 heap_size
+
+ $size_in_bytes = heap_size();
+
+Measures and returns the size of the entire process heap space.
+
+Not accurate yet.
+
=head1 COPYRIGHT
Copyright (C) 2005 Dan Sugalski,
use Test::More;
use strict;
-my $tests;
+plan skip_all => "Test::Pod::Coverage 1.08 required for testing POD coverage"
+ unless eval "use Test::Pod::Coverage 1.08; 1";
-BEGIN
- {
- $tests = 1;
- plan tests => $tests;
- chdir 't' if -d 't';
- use lib '../lib';
- };
+my $tests = 1;
+plan tests => $tests;
+chdir 't' if -d 't';
-SKIP:
- {
- skip("Test::Pod::Coverage 1.08 required for testing POD coverage", $tests)
- unless do {
- eval "use Test::Pod::Coverage 1.08";
- $@ ? 0 : 1;
- };
- for my $m (qw/
+use lib '../lib';
+
+for my $m (qw(
Devel::SizeMe
- /)
- {
+)) {
pod_coverage_ok( $m, "$m is covered" );
- }
- }
+}