package Egg::Plugin::Prototype; # # Masatoshi Mizuno ElusheE<64>cpan.orgE # # $Id: Prototype.pm 226 2008-01-27 10:23:16Z lushe $ # use strict; use warnings; use base 'Class::Data::Inheritable'; use HTML::Prototype; our $VERSION = '3.00'; __PACKAGE__->mk_classdata('prototype'); eval { require HTML::Prototype::Useful; }; if ( $@ ) { __PACKAGE__->prototype( HTML::Prototype->new ); } else { __PACKAGE__->prototype( HTML::Prototype::Useful->new ); } 1; __END__ =head1 NAME Egg::Plugin::Prototype - Plugin for Prototype =head1 SYNOPSIS # use it use Egg qw/ Prototype /; # ...add this to your mason template... <% $e->prototype->define_javascript_functions %> # ...and use the helper methods...
% my $uri = $e->config->{static_uri}. 'edit/'. $e->page_title; <% $e->prototype->observe_field( 'editor', $uri, { 'update' => 'view' } ) %> =head1 DESCRIPTION Some stuff to make Prototype fun. This plugin replaces L. =head1 METHODS =head2 prototype Returns a ready to use L object. =head1 SEE ALSO L, L, L, =head1 AUTHOR This code is a transplant of 'Masatoshi Mizuno ElusheE<64>cpan.orgE' of the code of 'L'. Therefore, the copyright of this code is assumed to be the one that belongs to 'Sebastian Riedel, C'. =head1 LICENSE This library is free software . You can redistribute it and/or modify it under the same terms as perl itself. =cut