[Jifty-commit] jifty branch, jifty_client, updated. 3abb71013611b09829e944b15352958fba33fc36
Jifty commits
jifty-commit at lists.jifty.org
Sat May 1 04:35:53 EDT 2010
The branch, jifty_client has been updated
via 3abb71013611b09829e944b15352958fba33fc36 (commit)
from 71b72da4108bfb851682dce70edcc5a00850bcfa (commit)
Summary of changes:
lib/Jifty/Plugin/REST/Dispatcher.pm | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit 3abb71013611b09829e944b15352958fba33fc36
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Sat May 1 16:35:17 2010 +0800
Set isa: JiftyModel
JSON wants to quote everything, Joose does not want the superclass
name to be quoted. So we have to unquote the superclass name
ourselves. Pretty lame.
diff --git a/lib/Jifty/Plugin/REST/Dispatcher.pm b/lib/Jifty/Plugin/REST/Dispatcher.pm
index e3231c3..4af1c41 100644
--- a/lib/Jifty/Plugin/REST/Dispatcher.pm
+++ b/lib/Jifty/Plugin/REST/Dispatcher.pm
@@ -980,12 +980,21 @@ sub show_joose_class {
}
my $properties = {
+ isa => 'JiftyModel',
has => $cols,
};
- return "Class('$class_name',"
+ my $class_definition = "Class('$class_name',"
. Jifty::JSON::encode_json($properties)
. ");";
+
+ # argh! I don't see any way to let JSON encode barewords. even trying
+ # to confuse it with an object that defines a TO_JSON method returning
+ # a bareword does not work. and Joose does not let you say isa: 'Super'.
+ # better ideas welcome...
+ $class_definition =~ s/"isa":"JiftyModel"/"isa":JiftyModel/;
+
+ return $class_definition;
}
=head2 run_action
-----------------------------------------------------------------------
More information about the Jifty-commit
mailing list