{
    "mode": "perldoc",
    "parameter": "Devel::Symdump",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Devel%3A%3ASymdump/json",
    "generated": "2026-06-03T00:29:22Z",
    "synopsis": "# Constructor\nrequire Devel::Symdump;\n@packs = qw(somepackage anotherpackage);\n$obj = Devel::Symdump->new(@packs);        # no recursion\n$obj = Devel::Symdump->rnew(@packs);       # with recursion\n# Methods\n@array = $obj->packages;\n@array = $obj->scalars;\n@array = $obj->arrays;\n@array = $obj->hashes;\n@array = $obj->functions;\n@array = $obj->filehandles;  # deprecated, use ios instead\n@array = $obj->dirhandles;   # deprecated, use ios instead\n@array = $obj->ios;\n@array = $obj->unknowns;     # only perl version < 5.003 had some\n$string = $obj->asstring;\n$string = $obj->asHTML;\n$string = $obj1->diff($obj2);\n$string = Devel::Symdump->isatree;    # or $obj->isatree\n$string = Devel::Symdump->inhtree;    # or $obj->inhtree\n# Methods with autogenerated objects\n# all of those call new(@packs) internally\n@array = Devel::Symdump->packages(@packs);\n@array = Devel::Symdump->scalars(@packs);\n@array = Devel::Symdump->arrays(@packs);\n@array = Devel::Symdump->hashes(@packs);\n@array = Devel::Symdump->functions(@packs);\n@array = Devel::Symdump->ios(@packs);\n@array = Devel::Symdump->unknowns(@packs);",
    "sections": {
        "NAME": {
            "content": "Devel::Symdump - dump symbol names or the symbol table\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "# Constructor\nrequire Devel::Symdump;\n@packs = qw(somepackage anotherpackage);\n$obj = Devel::Symdump->new(@packs);        # no recursion\n$obj = Devel::Symdump->rnew(@packs);       # with recursion\n\n# Methods\n@array = $obj->packages;\n@array = $obj->scalars;\n@array = $obj->arrays;\n@array = $obj->hashes;\n@array = $obj->functions;\n@array = $obj->filehandles;  # deprecated, use ios instead\n@array = $obj->dirhandles;   # deprecated, use ios instead\n@array = $obj->ios;\n@array = $obj->unknowns;     # only perl version < 5.003 had some\n\n$string = $obj->asstring;\n$string = $obj->asHTML;\n$string = $obj1->diff($obj2);\n\n$string = Devel::Symdump->isatree;    # or $obj->isatree\n$string = Devel::Symdump->inhtree;    # or $obj->inhtree\n\n# Methods with autogenerated objects\n# all of those call new(@packs) internally\n@array = Devel::Symdump->packages(@packs);\n@array = Devel::Symdump->scalars(@packs);\n@array = Devel::Symdump->arrays(@packs);\n@array = Devel::Symdump->hashes(@packs);\n@array = Devel::Symdump->functions(@packs);\n@array = Devel::Symdump->ios(@packs);\n@array = Devel::Symdump->unknowns(@packs);\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This little package serves to access the symbol table of perl.\n\n\"Devel::Symdump->rnew(@packages)\"\nreturns a symbol table object for all subtrees below @packages. Nested Modules are analyzed\nrecursively. If no package is given as argument, it defaults to \"main\". That means to get\nthe whole symbol table, just do a \"rnew\" without arguments.\n\nThe global variable $Devel::Symdump::MAXRECURSION limits the recursion to prevent\ncontention. The default value is set to 97, just low enough to survive the test suite\nwithout a warning about deep recursion.\n\n\"Devel::Symdump->new(@packages)\"\ndoes not go into recursion and only analyzes the packages that are given as arguments.\n\npackages, scalars, arrays, hashes, functions, ios\nThe methods packages(), scalars(), arrays(), hashes(), functions(), ios(), and (for older\nperls) unknowns() each return an array of fully qualified symbols of the specified type in\nall packages that are held within a Devel::Symdump object, but without the leading \"$\", \"@\"\nor \"%\". In a scalar context, they will return the number of such symbols. Unknown symbols\nare usually either formats or variables that haven't yet got a defined value.\n\nNote that scalar symbol table entries are a special case. If a symbol table entry exists at\nall, presence of a scalar is currently unknowable, due to a feature of Perl described in\n\"Making References\" in perlref point 7. For example, this package will mark a scalar value\n$foo as present if any of @foo, %foo, &foo etc. have been declared or used.\n\nasstring\nasHTML\nAsstring() and asHTML() return a simple string/HTML representations of the object.\n\ndiff\nDiff() prints the difference between two Devel::Symdump objects in human readable form. The\nformat is similar to the one used by the asstring method.\n\nisatree\ninhtree\nIsatree() and inhtree() both return a simple string representation of the current\ninheritance tree. The difference between the two methods is the direction from which the\ntree is viewed: top-down or bottom-up. As I'm sure, many users will have different\nexpectation about what is top and what is bottom, I'll provide an example what happens when\nthe Socket module is loaded:\n\n% print Devel::Symdump->inhtree\nAutoLoader\nDynaLoader\nSocket\nDynaLoader\nSocket\nExporter\nCarp\nConfig\nSocket\n\nThe inhtree method shows on the left hand side a package name and indented to the right the\npackages that use the former.\n\n% print Devel::Symdump->isatree\nCarp\nExporter\nConfig\nExporter\nDynaLoader\nAutoLoader\nSocket\nExporter\nDynaLoader\nAutoLoader\n\nThe isatree method displays from left to right ISA relationships, so Socket IS A DynaLoader\nand DynaLoader IS A AutoLoader. (Actually, they were at the time this manpage was written)\n\nYou may call both methods, isatree() and inhtree(), with an object. If you do that, the object\nwill store the output and retrieve it when you call the same method again later. The typical\nusage would be to use them as class methods directly though.\n",
            "subsections": []
        },
        "SUBCLASSING": {
            "content": "The design of this package is intentionally primitive and allows it to be subclassed easily. An\nexample of a (maybe) useful subclass is Devel::Symdump::Export, a package which exports all\nmethods of the Devel::Symdump package and turns them into functions.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "Routines for manipulating stashes: \"Package::Stash\"; to work with lexicals: \"PadWalker\".\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "Andreas Koenig <andk@cpan.org> and Tom Christiansen <tchrist@perl.com>. Based on the old\ndumpvar.pl by Larry Wall.\n\nCOPYRIGHT, LICENSE\nThis module is\n\nCopyright (c) 1995, 1997, 2000, 2002, 2005, 2006 Andreas Koenig \"<andk@cpan.org>\".\n\nAll rights reserved.\n\nThis library is free software; you may use, redistribute and/or modify it under the same terms\nas Perl itself.\n",
            "subsections": []
        }
    },
    "summary": "Devel::Symdump - dump symbol names or the symbol table",
    "flags": [],
    "examples": [],
    "see_also": []
}