git-cpan-module: Devel-Size
git-cpan-version: 0.03
git-cpan-authorid: DSUGAL
git-cpan-file: authors/id/D/DS/DSUGAL/Devel-Size-0.03.tar.gz
@EXPORT = qw(
);
-$VERSION = '0.02';
+$VERSION = '0.03';
bootstrap Devel::Size $VERSION;
=head1 BUGS
-Only does plain scalars and arrays. No sizes for hashes, globs, code refs, or magic scalars. Yet.
+Only does plain scalars, hashes, and arrays. No sizes for globs or code refs. Yet.
Also, this module currently only returns the size used by the variable
itself, I<not> the contents of arrays or hashes, nor does it follow
total_size += SvLEN(thing);
break;
case SVt_PVMG:
- croak("Not yet");
+ total_size += sizeof(XPVMG);
+ total_size += SvLEN(thing);
break;
case SVt_PVBM:
croak("Not yet");
{
HE *cur_entry;
IV cur_bucket = 0;
- puts("Foo!");
for (cur_bucket = 0; cur_bucket <= HvMAX(thing); cur_bucket++) {
cur_entry = *(HvARRAY(thing) + cur_bucket);
while (cur_entry) {