1HTML::Mason::ComponentSUosuerrceC(o3n)tributed Perl DocuHmTeMnLt:a:tMiaosnon::ComponentSource(3)
2
3
4

NAME

6       HTML::Mason::ComponentSource - represents information about an
7       component
8

SYNOPSIS

10           my $info = $resolver->get_info($comp_path);
11

DESCRIPTION

13       Mason uses the ComponentSource class to store information about a
14       source component, one that has yet to be compiled.
15

METHODS

17       new This method takes the following arguments:
18
19           ·   comp_path
20
21               The component's component path.
22
23           ·   last_modified
24
25               This is the last modification time for the component, in Unix
26               time (seconds since the epoch).
27
28           ·   comp_id
29
30               This is a unique id for the component used to distinguish two
31               components with the same name in different component roots.
32
33               If your resolver does not support multiple component roots,
34               this can simply be the same as the "comp_path" key or it can be
35               any other id you wish.
36
37               This value will be used when constructing filesystem paths so
38               it needs to be something that works on different filesystems.
39               If it contains forward slashes, these will be converted to the
40               appropriate filesystem-specific path separator.
41
42               In fact, we encourage you to make sure that your component ids
43               have some forward slashes in them or also all of your generated
44               object files will end up in a single directory, which could
45               affect performance.
46
47           ·   comp_class
48
49               The component class into which this particular component should
50               be blessed when it is created.  This must be a subclass of
51               "HTML::Mason::Component", which is the default.
52
53           ·   friendly_name
54
55               This is used when displaying error messages related to the
56               component, like parsing errors.  This should be something that
57               will help whoever sees the message identify the component.  For
58               example, for component stored on the filesystem, this should be
59               the absolute path to the component.
60
61           ·   source_callback
62
63               This is a subroutine reference which, when called, returns the
64               component source.
65
66               The reasoning behind using this parameter is that it helps
67               avoid a profusion of tiny little "HTML::Mason::ComponentSource"
68               subclasses that don't do very much.
69
70           ·   extra
71
72               This optional parameter should be a hash reference.  It is used
73               to pass information from the resolver to the component class.
74
75               This is needed since a "HTML::Mason::Resolver" subclass and a
76               "HTML::Mason::Component" subclass can be rather tightly
77               coupled, but they must communicate with each through the
78               interpreter (this may change in the future).
79
80       comp_path
81       last_modified
82       comp_id
83       comp_class
84       friendly_name
85       extra
86           These are all simple accessors that return the value given to the
87           constructor.
88
89       comp_source
90           Returns the source of the component.
91
92       object_code ( compiler => $compiler )
93           Given a compiler, this method returns the object code for the
94           component.
95
96       HTML::Mason, HTML::Mason::Admin, HTML::Mason::Component
97
98
99
100perl v5.30.0                      2019-07-26   HTML::Mason::ComponentSource(3)
Impressum