[Jifty-commit] r6007 - in jifty/trunk: .
Jifty commits
jifty-commit at lists.jifty.org
Mon Nov 17 18:20:07 EST 2008
Author: sartak
Date: Mon Nov 17 18:19:44 2008
New Revision: 6007
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Plugin/Chart/Dispatcher.pm
Log:
r75684 at onn: sartak | 2008-11-17 18:19:18 -0500
Don't require that there be a special class for renderers to load
Modified: jifty/trunk/lib/Jifty/Plugin/Chart/Dispatcher.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Chart/Dispatcher.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/Chart/Dispatcher.pm Mon Nov 17 18:19:44 2008
@@ -59,16 +59,16 @@
$args->{width} ||= 400;
$args->{height} ||= 300;
- my $class = $classes{$renderer};
-
- # Use the "type" to determine which class to use
- $class =~ s/\$TYPE/$args->{type}/g;
-
- # Load that class or die if it does not exist
- $class->require;
-
- # Remember the class name for the view
- $args->{class} = $class;
+ if (my $class = $classes{$renderer}) {
+ # Use the "type" to determine which class to use
+ $class =~ s/\$TYPE/$args->{type}/g;
+
+ # Load that class or die if it does not exist
+ $class->require;
+
+ # Remember the class name for the view
+ $args->{class} = $class;
+ }
# Send them on to chart the chart
set 'args' => $args;
More information about the Jifty-commit
mailing list