1HTML::Mason::Resolver(3U)ser Contributed Perl DocumentatiHoTnML::Mason::Resolver(3)
2
3
4

NAME

6       HTML::Mason::Resolver - Component path resolver base class
7

SYNOPSIS

9         # make a subclass and use it
10

DESCRIPTION

12       The resolver is responsible for translating a component path like
13       /foo/index.html into a component.  By default, Mason expects components
14       to be stored on the filesystem, and uses the
15       HTML::Mason::Resolver::File class to get information on these
16       components.
17
18       The HTML::Mason::Resolver provides a virtual parent class from which
19       all resolver implementations should inherit.
20

Class::Container

22       This class is used by most of the Mason object's to manage constructor
23       parameters and has-a relationships with other objects.
24
25       See the documentation on this class for details on how to declare what
26       parameters are valid for your subclass's constructor.
27
28       HTML::Mason::Resolver is a subclass of Class::Container so you do not
29       need to subclass it yourself.
30

METHODS

32       If you are interested in creating a resolver subclass, you must
33       implement the following methods.
34
35       new This method is optional.  The new method included in this class is
36           simply inherited from "Class::Container".  If you need something
37           more complicated done in your new method you will need to override
38           it in your subclass.
39
40       get_info
41           Takes three arguments: an absolute component path, a component root
42           key, and a component root path. Returns a new
43           HTML::Mason::ComponentSource object.
44
45       glob_path
46           Takes two arguments: a path glob pattern, something like "/foo/*"
47           or "/foo/*/bar", and a component root path. Returns a list of
48           component paths for components which match this glob pattern.
49
50           For example, the filesystem resolver simply appends this pattern to
51           the component root path and calls the Perl "glob()" function to
52           find matching files on the filesystem.
53
54   Using a Resolver with HTML::Mason::ApacheHandler
55       If you are creating a new resolver that you intend to use with the
56       HTML::Mason::ApacheHandler module, then you must implement the
57       following method as well.
58
59       apache_request_to_comp_path ($r, @comp_root_array)
60           This method, given an Apache object and a list of component root
61           pairs, should return a component path or undef if none exists.
62           This method is used by the HTML::Mason::ApacheHandler class to
63           translate web requests into component paths.  You can omit this
64           method if your resolver subclass will never be used in conjunction
65           with HTML::Mason::ApacheHandler.
66
67
68
69perl v5.30.0                      2019-07-26          HTML::Mason::Resolver(3)
Impressum