Since I wondered this for awhile myself and since this one has a formulaic answer, I've added a new script so you can now just run:<br><br>bin/jifty script -n my-fancy-cli<br><br>and it will add "my-fancy-cli" to you bin directory with everything you need to get started with a command-line tool to do some server-side tweaking of your Jifty app.
<br><br>Cheers,<br>Andrew<br><br><div><span class="gmail_quote">On 1/7/08, <b class="gmail_sendername">Shawn M Moore</b> <<a href="mailto:sartak@bestpractical.com">sartak@bestpractical.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Sat, Jan 05, 2008 at 05:21:50AM -0800, Stanislav Sinyagin wrote:<br>> hi all,<br>><br>> a long-time RT user, I tried to utilize SearchBuilder<br>> for my new project, and finally I found Jifty - which looks very promising.
<br><br>Yeah, Jifty takes everything RT's framework did and cranks the notch<br>from six to ten. :)<br><br>> use warnings;<br>> use strict;<br>> use File::Basename qw(dirname);<br>> use UNIVERSAL::require;
<br>><br>> use Jifty;<br>><br>> my $devclass = Jifty->app_class('Model', 'Device');<br>><br>> my $device = $devclass->new();<br>><br>> $device->create(hostname => 'aaa',
<br>> ipv4addr => '<a href="http://10.0.0.1">10.0.0.1</a>');<br>><br>><br>> $device->set_property('snmp-community', 'aaabbb');<br>> ================<br>><br>
> This code results in<br>> Can't locate object method "new" via package "Toponet::Model::Device"<br>> (perhaps you forgot to load "Toponet::Model::Device"?) at bin/test.pl line 12.
<br><br>If you replace:<br><br> use Jifty;<br><br>with:<br><br> use Jifty::Everything;<br> BEGIN { Jifty->new }<br><br>it should work. I'm not sure if Jifty->new is required to be in a BEGIN<br>block, but it's how I use it.
<br><br>> thanks,<br>> stan<br><br>Shawn<br><br>_______________________________________________<br>jifty-devel mailing list<br><a href="mailto:jifty-devel@lists.jifty.org">jifty-devel@lists.jifty.org</a><br><a href="http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel">
http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel</a><br></blockquote></div><br>