[jifty-devel] Janitorial: lib/Jifty/Request.pm

Edgar Whipple jifty at misterwhipple.com
Fri Mar 2 23:19:18 EST 2007

I did some janitorial work on Request.pm, and attached the resulting
patch for review. I'll wait for comment until Sunday evening before
committing, or longer on request.

I did this work against the template-declare branch, because it had the
most recent version of Request.pm in it.

My primary goal was visual formatting, so I avoided code changes and
only changed whitespace...with the following exceptions: 

-- changed '\|' to '[|]' and '\?' to '[?]' in regexes.
-- changed grep from expression form to block form
   (added {} around expression, removed comma).
-- added explicit 'return' to final expression in subs.
-- changed 'return undef' to bare 'return'.
-- in Jifty::Request->clone(), refactored clone creation out of 'bless'
   call into separate 'my $new_object', for clarity.
-- transferred 'use strict' and 'use warnings' to the inside of each
   package. (Those pragmas are lexically scoped.)

I did *not* add an explicit return at the end of J::R->delete() or
J::R->do_mapping(). Their final values were not clear to me, as one has
nested if's and the other ends in a for loop. Probably an explicit
return should be bare, but I couldn't be certain without a much closer

ln -s /dev/null ~/.sig
-------------- next part --------------
A non-text attachment was scrubbed...
Name: request.pm-janitorial.patch
Type: text/x-patch
Size: 26577 bytes
Desc: not available
Url : http://lists.bestpractical.com/pipermail/jifty-devel/attachments/20070302/18888476/request.pm-janitorial.bin

More information about the jifty-devel mailing list