02 Oct 2013 12:41:52 UTC
- Distribution: MasonX-Resolver-WidgetFactory
- Module version: 0.009
- Source (raw)
- Browse (raw)
- How to Contribute
- Repository (git clone)
- Issues (0)
- Testers (376 / 48 / 0)
- KwaliteeBus factor: 1
- % Coverage
- License: perl_5
- Activity24 month
- Download (14.46KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionRJBS Ricardo SIGNES 😄and 1 contributors
- Hans Dieter Pearcey, <hdp at pobox.com>
MasonX::Resolver::WidgetFactory - resolve paths to HTML::Widget::Factory plugins
use MasonX::Resolver::WidgetFactory; my $res = MasonX::Resolver::WidgetFactory->new( factory => My::Widget::Factory->new, prefix => '/widget', ); my $interp = HTML::Mason::Interp->new( resolver => $res, # ... other options ... );
This Resolver exposes the plugins of a HTML::Widget::Factory object as virtual components under a given prefix.
my $res = MasonX::Resolver::WidgetFactory->new( prefix => '/widget', ); # elsewhere: <& /widget/select, name => "myselect", options => \@options &>
The component call to
/widget/selectis translated to
Among other things, this means that you can use component-with-content calls, which may be easier in some situations:
<&| /widget/button &> This is normal mason content, including <% $various_interpolations %> and other <& /component/calls &> </&>
The component path root under which to respond.
The HTML::Widget::Factory object to use. Defaults to a new HTML::Widget::Factory object.
Boolean. If false (the default), the resolver will return false when asked to resolve a path that does not correspond to a widget provided by the factory. If true, it will die instead.
Hans Dieter Pearcey, <hdp at pobox.com>
This software is copyright (c) 2008 by Hans Dieter Pearcey.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Module Install Instructions
To install MasonX::Resolver::WidgetFactory, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install MasonX::Resolver::WidgetFactory
For more information on module installation, please visit the detailed CPAN module installation guide.