[Jifty-commit] r3945 - in jifty/trunk: lib/Jifty/Plugin/UUID lib/Jifty/Plugin/Userpic lib/Jifty/View/Declare

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Thu Aug 23 12:47:41 EDT 2007


Author: jesse
Date: Thu Aug 23 12:47:40 2007
New Revision: 3945

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/lib/Jifty/Plugin/UUID/Widget.pm
   jifty/trunk/lib/Jifty/Plugin/Userpic/Dispatcher.pm
   jifty/trunk/lib/Jifty/Plugin/Userpic/View.pm
   jifty/trunk/lib/Jifty/Plugin/Userpic/Widget.pm
   jifty/trunk/lib/Jifty/View/Declare/BaseClass.pm

Log:
 r66536 at pinglin:  jesse | 2007-08-23 12:19:20 -0400
 * Minor pod additions. removing unneeded wrappers


Modified: jifty/trunk/lib/Jifty/Plugin/UUID/Widget.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/UUID/Widget.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/UUID/Widget.pm	Thu Aug 23 12:47:40 2007
@@ -18,9 +18,6 @@
 
 =cut
 
-# TODO FIXME XXX Is this really necessary?
-sub accessors { shift->SUPER::accessors() };
-
 =head2 render_widget
 
 Renders form fields as a UUID.

Modified: jifty/trunk/lib/Jifty/Plugin/Userpic/Dispatcher.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Userpic/Dispatcher.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/Userpic/Dispatcher.pm	Thu Aug 23 12:47:40 2007
@@ -1,7 +1,31 @@
+use warnings;
+use strict;
+
 package Jifty::Plugin::Userpic::Dispatcher;
 
+
+=head1 NAME
+
+Jifty::Plugin::Userpic::Dispatcher
+
+=head1 DESCRIPTION
+
+The dispatcher for the Jifty Userpic plugin
+
+=cut
+
 use Jifty::Dispatcher -base;
 
+
+=head1 RULES
+
+=head2 on /=/plugin/userpic/*/#/*
+
+When we're asked for a userpic for /recordclass/id/fieldname,  set it up and call /userpic/image.
+
+=cut
+
+
 on '/=/plugin/userpic/*/#/*' => run {
     my $class = $1;
     my $id = $2;

Modified: jifty/trunk/lib/Jifty/Plugin/Userpic/View.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Userpic/View.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/Userpic/View.pm	Thu Aug 23 12:47:40 2007
@@ -2,6 +2,25 @@
 
 use Jifty::View::Declare -base;
 
+
+=head1 NAME
+
+Jifty::Plugin::Userpic::View
+
+=head1 DESCRIPTION
+
+A view package for the Userpic plugin.
+
+
+=head1 TEMPLATES
+
+
+=head2 userpic/image
+
+Outputs the image stored in 'field' of 'item'. (Both of those are set by the dispatcher)
+
+=cut
+
 template 'userpic/image' => sub {
     my ($item,$field) = get(qw(item field));
     Jifty->handler->apache->content_type("image/jpeg");

Modified: jifty/trunk/lib/Jifty/Plugin/Userpic/Widget.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Userpic/Widget.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/Userpic/Widget.pm	Thu Aug 23 12:47:40 2007
@@ -14,8 +14,6 @@
 
 =cut
 
-sub accessors { shift->SUPER::accessors() };
-
 =head2 render_widget
 
 Renders form fields as googlemap widget.

Modified: jifty/trunk/lib/Jifty/View/Declare/BaseClass.pm
==============================================================================
--- jifty/trunk/lib/Jifty/View/Declare/BaseClass.pm	(original)
+++ jifty/trunk/lib/Jifty/View/Declare/BaseClass.pm	Thu Aug 23 12:47:40 2007
@@ -63,13 +63,23 @@
 
 use Attribute::Handlers;
 my (%Static, %Action);
-sub Static :ATTR(CODE,BEGIN) {
-    $Static{$_[2]}++;
-}
 
-sub Action :ATTR(CODE,BEGIN) {
-    $Action{$_[2]}++;
-}
+=head2 Static
+
+This function allows a developer to mark a Template::Declare template as static (unchanging), so that the compiled version can be cached on the client side and inserted with javascript
+
+=cut
+
+sub Static :ATTR(CODE,BEGIN) { $Static{$_[2]}++; }
+
+=head2 Action
+
+This function allows a developer to mark a Template::Declare template as an action. clkao owes documentation as to the meaning of this and when it would be acceptable to use it.
+
+=cut
+
+
+sub Action :ATTR(CODE,BEGIN) { $Action{$_[2]}++; }
 
 =head2 client_cacheable
 


More information about the Jifty-commit mailing list