[jifty-devel] A jifty console.

Kang-min Liu gugod at gugod.org
Sat May 19 11:15:53 EDT 2007


Hi, jifty team.

I've just checked in a "console" for jifty application (lib/Jifty/ 
Script/Console.pm).
During my recent developing of jifty app, this scripts helps a lot  
when I'm still
trying to understand how things work. I can quickly test a few lines  
of code right
in this shell. Like this:

% bin/jifty script
jifty> my $foos = Jifty->app_class("Model", "FooCollection")->new;
jifty> $foo->unlimit;
jifty> YAML::Dump($foo)

This idea is simply from the script/console in any rails  
applications. It can be used
for debugging purpose, maybe for maintaining purpose too. Since Jifty  
have many
Perl internal hacks, sometimes it's harder to check if your code goes  
right or wrong
using your old way. For example, "perl -cw" wont work if you use any  
one of
auto-generated collection classes. So I think this script can help  
with something
like that. However, I think, the most important one, is for learning  
Jifty more easily.
Before people have enough knowledge to write unit tests, they can  
play around
in this console to get some feeling about how to do things in Jifty.

I hope you guys like it, and it's really useful too.


Cheers,
Kang-min Liu
gugod at gugod.org





More information about the jifty-devel mailing list