Use ps.
> perl -de 1
> use Dependency::Of::YourMod::One;
> use Dependency::Of::YourMod::Two;Then ps the process:
ps -O rss,vsz | grep 'perl -de'
The second and third numbers you'll see are the resident and virtual memory size.
> use YourMod;
Then ps the process again:
ps -O rss,vsz | grep 'perl -de'
That difference covers the needs of the module itself, and ignores the dependencies.
Now, that assumes that all your initialization runs at compile-time. If you have a singleton implementation you might need to create one to get the full module use.
A minor addition (Score:1)