Sledge::Plugin::Prototype - Sledge plugin which implements wrapper arround HTML::Prototype module
package Foo::Pages::Bar; use Sledge::Plugin::Prototype; # just use # you can use parameter 'prototype' if template engine is tt [% prototype.define_javascript_functions %] # or in your dispatcher sub dispatch_prototype_js { shift->show_prototype_js; } # use the helper methods <div id="view"></div> <textarea id="editor" cols="80" rows="24"></textarea> [% prototype.observe_field( 'editor', 'http://foo.bar/baz', { 'update' => 'view' } ) %]
Sledge::Plugin::Prototype is Sledge plugin which implements wrapper arround HTML::Prototype module. use Sledge::Plugin::Prototype in your Pages class, then prototype method is imported in it. if you chose Sledge::Template::TT as template engine, parameter prototype is set in your template.
Sledge::Plugin::Prototype
prototype
Sledge::Template::TT
Yasuhiro Horiuchi <yasuhiro@hori-uchi.com>
HTML::Prototype
To install Sledge::Plugin::Prototype, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Sledge::Plugin::Prototype
CPAN shell
perl -MCPAN -e shell install Sledge::Plugin::Prototype
For more information on module installation, please visit the detailed CPAN module installation guide.