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 compo‐
16       nents.
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       paremeters 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 imple‐
33       ment 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 HTML::Mason::Compo‐
43           nentSource 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 com‐
48           ponent 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
56       If you are creating a new resolver that you intend to use with the
57       HTML::Mason::ApacheHandler module, then you must implement the follow‐
58       ing method as well.
59
60       apache_request_to_comp_path ($r, @comp_root_array)
61           This method, given an Apache object and a list of component root
62           pairs, should return a component path or undef if none exists.
63           This method is used by the HTML::Mason::ApacheHandler class to
64           translate web requests into component paths.  You can omit this
65           method if your resolver subclass will never be used in conjunction
66           with HTML::Mason::ApacheHandler.
67

SEE ALSO

69       HTML::Mason
70
71
72
73perl v5.8.8                       2007-04-17          HTML::Mason::Resolver(3)
Impressum