2010-11-01から1ヶ月間の記事一覧
今日覚えたこととか。 実はKolonとはあんまり関係ないかもしれない。 #!perl use strict; use warnings; use Encode; use Text::Xslate; use Data::Section::Simple; my $vpath = Data::Section::Simple->new()->get_data_section(); my $tx = Text::Xslate-…
#!perl use strict; use warnings; my $scalar = 'one'; my @array = qw/two three/; my %hash = (four => 'five'); my @ref = \($scalar, @array, %hash); for (@ref) { print ref $_, "\n"; } # 出力結果 # SCALAR # ARRAY # HASH 各要素に対して適用され…
#!perl use strict; use warnings; use DBIx::Skinny; use Text::Xslate; use Data::Section::Simple; my $vpath = Data::Section::Simple->new()->get_data_section(); my $tx = Text::Xslate->new(path => [$vpath]); { package MyModel; use DBIx::Skinny…
単語単位 行単位お初。
package MyForm; use strict; use warnings; use HTML::Shakan::Declare; use FormValidator::Lite::Constraint::Japanese; form 'add' => ( TextField( name => 'katakana', constraints => [ 'KATAKANA' ], ), TextField( name => 'hiragana', constraints…
#!perl use strict; use warnings; use utf8; my $str = 'カタカナ'; if ($str =~ /^\p{InKatakana}+$/) { warn 'match'; } else { warn 'not match'; } 初めて知った。 FormValidator::Liteのソースを読んでたら出くわした。 詳しくはperldoc perlunicodeあ…
起動したらF8連打
#!perl use strict; use warnings; package My::Form; use HTML::Shakan::Declare; form 'add' => ( TextField( name => 'name', label => 'name', constraints => [ [ 'REGEXP' => qr/^[\w]+$/ ], ], ), ); package main; use CGI; use Text::Xslate qw/mar…
memo # キロ $ du -k /home # メガ $ du -m /home なぜかよく忘れる