Devel::DumpSizes

Devel::DumpSizes is a Perl module to dump the name and size in bytes of variables that are available at a give point in a script
Download

Devel::DumpSizes Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Gautam Chekuri
  • Publisher web site:
  • http://search.cpan.org/~cgautam/Devel-DumpSizes-0.01/lib/Devel/DumpSizes.pm

Devel::DumpSizes Tags


Devel::DumpSizes Description

Devel::DumpSizes is a Perl module to dump the name and size in bytes of variables that are available at a give point in a script Devel::DumpSizes is a Perl module to dump the name and size in bytes (in increasing order) of variables that are available at a give point in a script.SYNOPSISuse Devel::DumpSizes qw/dump_sizes/;&Devel::DumpSizes::dump_sizes();Or,&Devel::DumpSizes::dump_sizes("/path/of/filename-to-dump-output");This will print the name of each variable and its size. The name and size are seperated by a '->'Variable name -> Size in bytesEXPORTSExports one subroutine by default:dump_sizesThis module allows us to print the names and sizes of variables that are available at a give point in a script.This module was written while debugging a huge long running script. The main use being to understand how variable sizes were fluctuating during script execution. It uses PadWalker and Devel::Symdump to get the variables. It uses Devel::Size to report the size of each variable.METHODSdump_sizesUsage: &Devel::DumpSizes::dump_sizes();OrUsage: &Devel::DumpSizes::dump_sizes("/path/of/filename-to-dump-output");This method accepts one optional parameter that will be used to create the file where the output is dumped.If parameter is given then two files will be create. One will have extension .my and will contain my variables. The second file will have extension .ol and will contain our/local variables. If no filename is given output is printed on STDOUT.As of now, the output is sectioned by printing the following at the start: 1. either of 'my' or 'our/local' to specify the kind of variables being reported. 2. output of time(). 3. If possible, subroutine name/line number as returned by caller (perldoc -f caller).All sizes are in Bytes as returned by Devel::Size. I plan to have more information reported in newer versions. Requirements: · Perl


Devel::DumpSizes Related Software