目次
jifty遊びでJiftyをつかってみた。Ruby on RailsのPerl版。buildはsubversion repositryをcheckout(*1)したあと、trunk配下で
% jifty action - add an action class to your jifty application adopt - localize a stock jifty component app - create the skeleton of a jifty application console - a console for your jifty application deps - looks for module dependencies and attempts to install them from cpan env - access the jifty environment fastcgi - a fastcgi server for your jifty application help - show help modperl2 - a modperl2 handler for your jifty app. model - add a model class to your jifty application plugin - create the skeleton of a jifty plugin po - extract translatable strings from your application repl - a repl for your jifty application schema - create sql to update or create your jifty app's tables script - add a new jifty script to your jifty application server - a standalone webserver for your jifty application
% find MyApp/ -type f MyApp/bin/jifty WebApp起動用のjifty script。基本、このscriptを使う。 MyApp/var/jifty-server.pid MyApp/Makefile.PL MyApp/etc/config.yml 構成ファイル MyApp/myapp
jifty knowhow memoetc/config.yml.ymlはYAMLに準じたTextのデータ形式。notationに沿っていないとparse errorで YAML::Syckモジュールがエラーをはく。 参考文献
Jifty/Plugin/Loginこれをinstallする上で依存関係のあるpkgを入れる必要があるが、爽やかにbuildが通らない。修正は以下の通り。
LWPx::ParanoidAgent?-1.03
37 # hostnames pointing to internal IPs 38 $res = $ua->get("http://localhost-fortest.danga.com/"); 39 ok(! $res->is_success && $res->status_line =~ /Suspicious DNS results/);
lib/LWPx/ParanoidAgent.pm 46 sub _resolve { 47 my ($self, $host, $request, $timeout, $depth) = @_; 48 my $res = $self->resolver; 49 $depth ||= 0; 50 51 die "CNAME recursion depth limit exceeded.\n" if $depth > 10; 52 die "Suspicious results from DNS lookup" if $self->_bad_host($host); 53 54 # return the IP address if it looks like one and wasn't marked bad 55 return ($host) if $host =~ /^\d+\.\d+\.\d+\.\d+$/; 56 57 my $sock = $res->bgsend($host) 58 or die "No sock from bgsend"; 59 60 my $rin = ''; 61 vec($rin, fileno($sock), 1) = 1; 62 my $nf = select($rin, undef, undef, $self->_time_remain($request)); 63 die "DNS lookup timeout" unless $nf; 64 65 my $packet = $res->bgread($sock) 66 or die "DNS bgread failure"; 67 $sock = undef; 68 69 my @addr; 70 my $cname; 71 foreach my $rr ($packet->answer) { 72 if ($rr->type eq "A") { 73 die "Suspicious DNS results from A record\n" if $self->_bad_host
37 # hostnames pointing to internal IPs 38 #$res = $ua->get("http://localhost-fortest.danga.com/"); 39 #ok(! $res->is_success && $res->status_line =~ /Suspicious DNS results/); 40 ok(1);
Devel::GladiatorChangelog にはこんな感じに書いてある。かなり怪しいって言うか、こう言うのは爽やかに排除してほしい orz328 INSTALL 329 ======= 356 * Add Devel::Gladiator to Makefile.PL, other little fixes in here - sartak 462 PLUGIN 463 ====== 467 * A first pass attempt at a Devel::Gladiator plugin for Jifty. Doesn't seem 468 to work very well - jesse 3101 Jifty 0.70116 3102 3241 Internals 3244 * Removed support for Devel::Gladiator. It was very, very beta and 3245 caused server processes to end up as zombies -jesse Devel::Gladiatorのありかは http://code.sixapart.com/svn/Devel-Gladiator である。 coしたものをinstallすることはできたので、とりあえず入れてみた。 orz
WWW::Facebook::API
@@ -353,8 +355,7 @@ sub _add_url_params { sub _parser { my $parser = JSON::Any->new; - # JSON::Any needs to get fixed - $parser->handler->allow_nonref() if $parser->handlerType eq 'JSON::XS'; + $parser->handler->allow_nonref; return $parser; }
|