{
    "mode": "perldoc",
    "parameter": "HTML::Mason::Resolver",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/HTML%3A%3AMason%3A%3AResolver/json",
    "generated": "2026-06-13T14:52:59Z",
    "synopsis": "# make a subclass and use it",
    "sections": {
        "NAME": {
            "content": "HTML::Mason::Resolver - Component path resolver base class\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "# make a subclass and use it\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The resolver is responsible for translating a component path like /foo/index.html into a\ncomponent. By default, Mason expects components to be stored on the filesystem, and uses the\nHTML::Mason::Resolver::File class to get information on these components.\n\nThe HTML::Mason::Resolver provides a virtual parent class from which all resolver\nimplementations should inherit.\n",
            "subsections": []
        },
        "Class::Container": {
            "content": "This class is used by most of the Mason object's to manage constructor parameters and has-a\nrelationships with other objects.\n\nSee the documentation on this class for details on how to declare what parameters are valid for\nyour subclass's constructor.\n\nHTML::Mason::Resolver is a subclass of Class::Container so you do not need to subclass it\nyourself.\n",
            "subsections": []
        },
        "METHODS": {
            "content": "If you are interested in creating a resolver subclass, you must implement the following methods.\n\nnew This method is optional. The new method included in this class is simply inherited from\n\"Class::Container\". If you need something more complicated done in your new method you will\nneed to override it in your subclass.\n\ngetinfo\nTakes three arguments: an absolute component path, a component root key, and a component\nroot path. Returns a new HTML::Mason::ComponentSource object.\n\nglobpath\nTakes two arguments: a path glob pattern, something like \"/foo/*\" or \"/foo/*/bar\", and a\ncomponent root path. Returns a list of component paths for components which match this glob\npattern.\n\nFor example, the filesystem resolver simply appends this pattern to the component root path\nand calls the Perl \"glob()\" function to find matching files on the filesystem.\n",
            "subsections": [
                {
                    "name": "Using a Resolver with HTML::Mason::ApacheHandler",
                    "content": "If you are creating a new resolver that you intend to use with the HTML::Mason::ApacheHandler\nmodule, then you must implement the following method as well.\n\napacherequesttocomppath ($r, @comprootarray)\nThis method, given an Apache object and a list of component root pairs, should return a\ncomponent path or undef if none exists. This method is used by the\nHTML::Mason::ApacheHandler class to translate web requests into component paths. You can\nomit this method if your resolver subclass will never be used in conjunction with\nHTML::Mason::ApacheHandler.\n"
                }
            ]
        }
    },
    "summary": "HTML::Mason::Resolver - Component path resolver base class",
    "flags": [],
    "examples": [],
    "see_also": []
}