YacafiでURL引数をとかいろいろためしてみた
macportsからいれたperlが正常に動くようになったため、Yacafiでお試し的に作ってみた。
isSoundクエリで指定した文字を表示します。
#!/usr/local/bin/perl use strict; use warnings; use Yacafi; dispatch; sub do_index{ my $options = query('isSound'); view 'index', $options; } sub view_index{ my $arg = shift; 'Yacafi is '.$arg; }
~.cgi?action=index&isSound=happy
いろいろ簡単に弄れて面白いけど、ローカル環境の設定が原因でCPANモジュールをuseしたらエラーになった。エラーが解決するまでは、ほとんどの機能を自力で実装しなくちゃいけないっぽい。