Devel-SizeMe

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

sv_pvutf8n_force||5.006000|
sv_pvutf8n||5.006000|
sv_pvutf8||5.006000|
sv_pv||5.006000|
sv_recode_to_utf8||5.007003|
sv_reftype|||
sv_release_COW|||
sv_replace|||
sv_report_used|||
sv_reset|||
sv_rvweaken||5.006000|
sv_setiv_mg|5.004050||p
sv_setiv|||
sv_setnv_mg|5.006000||p
sv_setnv|||
sv_setpv_mg|5.004050||p
sv_setpvf_mg_nocontext|||pvn
sv_setpvf_mg|5.006000|5.004000|pv
sv_setpvf_nocontext|||vn
sv_setpvf||5.004000|v
sv_setpviv_mg||5.008001|

t/basic.t  view on Meta::CPAN


use constant LARGE => 'N' x 8192;

cmp_ok (total_size(\&LARGE), '>', 8192,
        'total_size for a constant includes the constant');

{
    my $a = [];
    my $b = \$a;
    # Scalar::Util isn't in the core before 5.7.something.
    # The test isn't really testing anything without the weaken(), but it
    # isn't counter-productive or harmful to run it anyway.
    unless (eval {
	require Scalar::Util;
	# making a weakref upgrades the target to PVMG and adds magic
	Scalar::Util::weaken($b);
	1;
    }) {
	die $@ if $] >= 5.008;
    }

    is(total_size($a), total_size([]),
       'Any intial reference is dereferenced and discarded');
}

# Must call direct - avoid all copying:



( run in 0.310 second using v1.01-cache-2.11-cpan-65fba6d93b7 )