[Jifty-commit] r6795 - jifty/trunk/lib/Jifty
Jifty commits
jifty-commit at lists.jifty.org
Thu Apr 16 19:01:15 EDT 2009
Author: sartak
Date: Thu Apr 16 19:01:14 2009
New Revision: 6795
Modified:
jifty/trunk/lib/Jifty/Web.pm
Log:
Refactor away duplication in Jifty->web->link
Modified: jifty/trunk/lib/Jifty/Web.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web.pm (original)
+++ jifty/trunk/lib/Jifty/Web.pm Thu Apr 16 19:01:14 2009
@@ -876,11 +876,12 @@
sub link {
my $self = shift;
- if (not defined wantarray) {
- Jifty::Web::Form::Clickable->new(@_)->generate->render;
- } else {
- return Jifty::Web::Form::Clickable->new(@_)->generate;
- }
+
+ my $link = Jifty::Web::Form::Clickable->new(@_)->generate;
+
+ return $link if defined wantarray;
+
+ $link->render;
}
=head3 return PARAMHASH
More information about the Jifty-commit
mailing list