From: Tim Bunce Date: Wed, 3 Oct 2012 12:10:37 +0000 (+0100) Subject: Fix pod coverage. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4283dcb89433515c8308fbdcc83e970f62d4467f;p=p5sagit%2FDevel-Size.git Fix pod coverage. --- diff --git a/lib/Devel/SizeMe.pm b/lib/Devel/SizeMe.pm index 278d3b4..38fa342 100644 --- a/lib/Devel/SizeMe.pm +++ b/lib/Devel/SizeMe.pm @@ -120,6 +120,36 @@ If loaded using the perl C<-d> option (i.e., C) then perl memory usage data will be written to a C 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 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 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, diff --git a/t/pod_cov.t b/t/pod_cov.t index d2896b0..ed3f094 100644 --- a/t/pod_cov.t +++ b/t/pod_cov.t @@ -3,28 +3,18 @@ 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" ); - } - } +}