16 May 2020 16:53:18 UTC
- Distribution: HTML-Mason
- Module version: 1.59
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (25)
- Testers (937 / 9 / 0)
- KwaliteeBus factor: 2
- 83.75% Coverage
- License: perl_5
- Download (316.08KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version++ed by:5 non-PAUSE users
HTML::Mason::ComponentSource - represents information about an component
my $info = $resolver->get_info($comp_path);
Mason uses the ComponentSource class to store information about a source component, one that has yet to be compiled.
This method takes the following arguments:
The component's component path.
This is the last modification time for the component, in Unix time (seconds since the epoch).
This is a unique id for the component used to distinguish two components with the same name in different component roots.
If your resolver does not support multiple component roots, this can simply be the same as the "comp_path" key or it can be any other id you wish.
This value will be used when constructing filesystem paths so it needs to be something that works on different filesystems. If it contains forward slashes, these will be converted to the appropriate filesystem-specific path separator.
In fact, we encourage you to make sure that your component ids have some forward slashes in them or also all of your generated object files will end up in a single directory, which could affect performance.
The component class into which this particular component should be blessed when it is created. This must be a subclass of
HTML::Mason::Component, which is the default.
This is used when displaying error messages related to the component, like parsing errors. This should be something that will help whoever sees the message identify the component. For example, for component stored on the filesystem, this should be the absolute path to the component.
This is a subroutine reference which, when called, returns the component source.
The reasoning behind using this parameter is that it helps avoid a profusion of tiny little
HTML::Mason::ComponentSourcesubclasses that don't do very much.
This optional parameter should be a hash reference. It is used to pass information from the resolver to the component class.
This is needed since a
HTML::Mason::Resolversubclass and a
HTML::Mason::Componentsubclass can be rather tightly coupled, but they must communicate with each through the interpreter (this may change in the future).
These are all simple accessors that return the value given to the constructor.
Returns the source of the component.
- object_code ( compiler => $compiler )
Given a compiler, this method returns the object code for the component.
|s||Focus search bar|
|?||Bring up this help dialog|
|g p||Go to pull requests|
|g i||go to github issues (only if github is preferred repository)|
|g a||Go to author|
|g c||Go to changes|
|g i||Go to issues|
|g d||Go to dist|
|g r||Go to repository/SCM|
|g s||Go to source|
|g b||Go to file browse|