tokuhirom@株主の日記 このページをアンテナに追加 RSSフィード

2009-06-18

ランキング 13:24 ランキング - tokuhirom@株主の日記 を含むブックマーク

   7432 tokuhirom
   2887 Yappo
   1370 hirose31
    887 nipotan
    601 miyagawa
    413 otsune
    316 hidek
    192 hyousuk
    176 hsegawa
    108 hsbt
    104 coji
     94 takesako
     91 kanfushihara
     79 acotie
     58 hasegawa
     47 nagayama
     12 kushii
     11 acot
      6 kan
      6 cho45

さて、なんのランキングでしょうか。

2008-11-11

Perlの3大つかわなきゃいいのに 13:11 Perlの3大つかわなきゃいいのに - tokuhirom@株主の日記 を含むブックマーク

  • cgi
  • ActivePerl
  • jcode.pl【New!】

なんか i のつく人が「windows とかしらないよ!」っていってたけど、まあそういうのもありだな、とおもう。

CGI が許されるのは小学生までだよねー」ってstevanもいってた。

2008-06-08

debugging code 00:19 debugging code - tokuhirom@株主の日記 を含むブックマーク

=== lib/App/Mobirc/Web/C/Mobile.pm
==================================================================
--- lib/App/Mobirc/Web/C/Mobile.pm      (revision 20477)
+++ lib/App/Mobirc/Web/C/Mobile.pm      (local)
@@ -100,7 +100,18 @@
     DEBUG "show channel page: $channel_name";
 
     my $channel = context->get_channel($channel_name);
-
+    use Data::Dumper;
+    warn Dumper(
+        {
+            mobile_agent => $c->req->mobile_agent,
+            channel      => $channel,
+            recent_mode  => $c->req->params->{recent_mode},
+            message      => $c->req->params->{'msg'} || '',
+            channel_page_option =>
+              context->run_hook( 'channel_page_option', $channel, $c ),
+            irc_nick => irc_nick,
+        }
+    );
     render_td(
         $c,
         'mobile/channel' => {

Templated 00:19 Templated - tokuhirom@株主の日記 を含むブックマーク

follow is sample implementation code:

package MyAPP::View::Templated::TT;
use strict;
use warnings;
use base 'Catalyst::View::Templated';
use Template;

sub new {
    my ($class, $c, $args) = @_;
    my $self = $class->next::method($c, $args);

    $self->{engine} = Template->new(INCLUDE_PATH => $self->{INCLUDE_PATH});

    return $self;
}

sub _render {
    my ($self, $template, $stash, $args) = @_;
    my $engine = $self->{engine};

    $engine->render($template, $stash, \my $out) or die $engine->error;
    $out;
}

1;

2008-05-29 このエントリーを含むブックマーク

# in main

my $c = Your::Context->new;
$c->load_config('config.yaml'); # feature of MooseX::Plaggerize::ConfigLoader
$c->load_plugin('HTMLFilter::StickyTime');
$c->load_plugin({module => 'HTMLFilter::DocRoot', config => { root => '/mobirc/' }});
$c->run();

package Your::Context;
use Moose;
with 'MooseX::Plaggerize', 'MooseX::Plaggerize::ConfigLoader';

sub run {
    my $self = shift;

    $self->run_hook('response_filter' => $args);
}

package Your::Plugin::HTMLFilter::StickyTime;
use strict;
use MooseX::Plaggerize::Plugin;

hook 'response_filter' => sub {
    my ($self, $context, $args) = @_;
};