{
    "mode": "perldoc",
    "parameter": "Module::Loaded",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Module%3A%3ALoaded/json",
    "generated": "2026-06-03T07:31:20Z",
    "synopsis": "use Module::Loaded;\n$bool = markasloaded('Foo');   # Foo.pm is now marked as loaded\n$loc  = isloaded('Foo');        # location of Foo.pm set to the\n# loaders location\neval \"require 'Foo'\";            # is now a no-op\n$bool = markasunloaded('Foo'); # Foo.pm no longer marked as loaded\neval \"require 'Foo'\";            # Will try to find Foo.pm in @INC",
    "sections": {
        "NAME": {
            "content": "Module::Loaded - mark modules as loaded or unloaded\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use Module::Loaded;\n\n$bool = markasloaded('Foo');   # Foo.pm is now marked as loaded\n$loc  = isloaded('Foo');        # location of Foo.pm set to the\n# loaders location\neval \"require 'Foo'\";            # is now a no-op\n\n$bool = markasunloaded('Foo'); # Foo.pm no longer marked as loaded\neval \"require 'Foo'\";            # Will try to find Foo.pm in @INC\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "When testing applications, often you find yourself needing to provide functionality in your test\nenvironment that would usually be provided by external modules. Rather than munging the %INC by\nhand to mark these external modules as loaded, so they are not attempted to be loaded by perl,\nthis module offers you a very simple way to mark modules as loaded and/or unloaded.\n",
            "subsections": []
        },
        "FUNCTIONS": {
            "content": "$bool = markasloaded( PACKAGE );\nMarks the package as loaded to perl. \"PACKAGE\" can be a bareword or string.\n\nIf the module is already loaded, \"markasloaded\" will carp about this and tell you from where\nthe \"PACKAGE\" has been loaded already.\n\n$bool = markasunloaded( PACKAGE );\nMarks the package as unloaded to perl, which is the exact opposite of \"markasloaded\".\n\"PACKAGE\" can be a bareword or string.\n\nIf the module is already unloaded, \"markasunloaded\" will carp about this and tell you the\n\"PACKAGE\" has been unloaded already.\n\n$loc = isloaded( PACKAGE );\n\"isloaded\" tells you if \"PACKAGE\" has been marked as loaded yet. \"PACKAGE\" can be a bareword or\nstring.\n\nIt returns falls if \"PACKAGE\" has not been loaded yet and the location from where it is said to\nbe loaded on success.\n",
            "subsections": []
        },
        "BUG REPORTS": {
            "content": "Please report bugs or other issues to <bug-module-loaded@rt.cpan.org<gt>.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "This module by Jos Boumans <kane@cpan.org>.\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "This library is free software; you may redistribute and/or modify it under the same terms as\nPerl itself.\n",
            "subsections": []
        }
    },
    "summary": "Module::Loaded - mark modules as loaded or unloaded",
    "flags": [],
    "examples": [],
    "see_also": []
}