RapidApp::Web1RenderContext::RenderByType
my $renderer= RapidApp::Web1RenderContext::RenderByType->new; $renderer->apply_rendererByRef( HASH => $myHashRenderer, 'Some::Class' => $myCustomRenderer, ); my $cx= RapidApp::Web1RenderContext->new( renderer => $renderer ); $cx->render($treeOfObjects);
This module is a Web 1.0 Renderer which simply refers to a lookup table by ref type to find the correct renderer for a given perl object. It can also associate renderers with ref types of 'HASH', 'ARRAY', 'REF', and so on.
Attempt to find the most appropriate renderer for a given data item.
We give first precedence to explicitly configured ref types.
If nothing was configured for that exact type, we walk up the ISA tree checking to see if each parent class was explicitly configured, or if we have a render_TYPE method for it, or if it has a "renderAsHtml" method.
If the named method exists, this returns a Renderer object which calls that method on $self. If it doesn't exist, this returns undef.
To install RapidApp, copy and paste the appropriate command in to your terminal.
cpanm
cpanm RapidApp
CPAN shell
perl -MCPAN -e shell install RapidApp
For more information on module installation, please visit the detailed CPAN module installation guide.