B::Stash - show what stashes are loaded
B::Stash has a poor side-effect only API and is only used by perlcc and B::C, and there its usability is also inferior.
It hooks into CHECK and prints a comma-seperated list of loaded stashes (package names) prefixed with -u.
With the xs option stashes with XS modules only are printed, prefixed with -x.
With the -D option some debugging output is added.
Note that the resulting list of modules from B::Stash is usually larger and more inexact than the list of used modules determined by the compiler suite (C, CC, Bytecode).
# typical usage: perlcc -stash -e'use IO::Handle;' perlcc -stash -v3 -e'use IO::Handle;' => ... Stash: main strict Cwd Regexp Exporter Exporter::Heavy warnings DB attributes Carp Carp::Heavy Symbol PerlIO SelectSaver ... perl -c -MB::Stash -e'use IO::Handle;' => -umain,-uIO perl -c -MB::Stash=xs -e'use IO::Handle;' => -xre,-xCwd,-xRegexp,-xIO perl -c -MO=Stash=xs,-D -e'use IO::Handle;' ... => -xre,-xCwd,-xRegexp,-xIO perl -c -MO=C,-dumpxs -e'use IO::Handle;' ... perlcc.lst: -xre,-xCwd,-xRegexp,-xIO
Vishal Bhatia <vishalb@hotmail.com> I(1999), Reini Urban perl-compiler@googlegroups.com I(2011)
perl-compiler@googlegroups.com
B::C has a superior two-pass stash scanner.
To install B::C, copy and paste the appropriate command in to your terminal.
cpanm
cpanm B::C
CPAN shell
perl -MCPAN -e shell install B::C
For more information on module installation, please visit the detailed CPAN module installation guide.