memo.xight.org

Home > Changelogメモ > Perl > 2ページ目 (全6ページ)
ChangeLog 最新ページ / カテゴリ最新ページ / 前ページ 1 2 3 4 5 6 次ページ / 2ページ目 (全6ページ)
2008-12 / 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

2006-07-19 Wed

adiary - Pure Perlで動作可能なフリーのblogシステム

- Summary
はてな記法が利用可能.
はてな形式,MovableType形式,JUGEM形式のインポート,エクスポートが可能.
tDiary形式もインポートが可能.
RDBMS (PostgreSQL,MySQL) やmod_perl2,SpeedyCGI を使用することも可能.

- Reference
adiary official website
http://adiary.abk.nu/

カテゴリ: [Software][Perl]

2006-06-22 Thu

PERL5WEBDB - Perl CGIのデバッガ

- Summary
MovableTypeもデバッグできる.

- Referece
31tools.com : PERL5WEBDB
http://31tools.com/perl5webdb/
Kazuho@Cybozu Labs - 2006-06-20 - PERL5WEBDB で Movable Type デバッグ
http://labs.cybozu.co.jp/blog/kazuho/archives/2006/06/mtdebug.php

- via
textfile.org - 2006-06-20
http://d.hatena.ne.jp/textfile/20060620/pwd

カテゴリ: [Perl]

2006-06-20 Tue

Unicode::Normalize で機種依存文字の置換 (Unicodeの正規化)

- Summary
UTF-8で変換できない機種依存文字を置換する [2006-06-19-13] の Perl版.
Unicode::Normalize を用いることで簡単に実現できる.

機種依存文字の変換ではなく,正しくは "Unicode の正規化" という作業のようだ.

- Reference
daily dayflower - Unicode::Normalize で遊ぶ
http://d.hatena.ne.jp/dayflower/20060605/1149478073

perl5.8のUnicodeサポート
http://www.lr.pi.titech.ac.jp/~abekawa/perl/perl_unicode.html#normalization

Unicode正規化
http://homepage1.nifty.com/nomenclator/unicode/normalization.htm

Unicode::Normalize

カテゴリ: [Perl]

2006-06-17 Sat

Premature end of script headers 対策

- Reference
Premature end of script headers
http://sagittarius.dip.jp/~toshi/premature.html
山本隆の開発日誌 - 2005-09-28 - Premature end of script headers
http://www.gesource.jp/weblog/archives/2005/09/premature_end_o.html

カテゴリ: [Perl]

2006-06-16 Fri

Regexp::Optimizer, Regexp::Assemble を用いた正規表現の最適化

- Reference
404 Blog Not Found:perl - 自動で /a|b|c/ を /[abc]/ にしてくれたら...
http://blog.livedoor.jp/dankogai/archives/50533165.html

qootas.org/blog - perl regex performance
http://qootas.org/blog/archives/2006/06/perl_regex_perf.html

Regexp::Optimizer
Regexp::Assemble

- via
www.textfile.org - 2006-06-16 - 正規表現の最適化
http://d.hatena.ne.jp/textfile/20060616/regex

カテゴリ: [Perl]

2006-06-05 Mon

eijiro.pl改 - 英辞郎データから検索するPerlスクリプト

- Reference
英辞郎 - コマンドラインから和英/英和単語翻訳
http://bulknews.net/lib/columns/02_eijiro/column.html
naoyaのはてなダイアリー - 2006-06-02 - eijiro.pl 改
http://d.hatena.ne.jp/naoya/20060602/1149254179

カテゴリ: [Perl]

2006-04-03 Mon

CPAN 最速検索

- Reference
CPAN saisoku search
http://cpan.ma.la/

- via
最速インターフェース研究会 :: CPAN最速検索
http://la.ma.la/blog/diary_200604021538.htm

カテゴリ: [Perl]

2006-04-03 Mon

Perlish Magazine

- Reference
FrontPage - Perlish Magazine
http://jp.rubyist.net/PerlMa/

カテゴリ: [Perl]

2006-03-16 Thu

Perlモジュール orz

- Reference
orz - Total Failure - search.cpan.org
http://search.cpan.org/~ingy/orz/lib/orz.pm
orz
- via
オレンジニュース - 2006-03-13
http://secure.ddo.jp/~kaku/tdiary/20060313.html#p02

カテゴリ: [Perl]

2006-03-06 Mon

 GD::Barcode::QRcode で各ページにQRコードの画像を付加

- Summary
[2006-03-05-1]を応用し,Refererを用いてQRコード生成.

- インストール

# aptitude install libexpat-dev libgd2-dev
# cpan install GD
# cpan install GD::Barcode::QRcode


- qr.cgi

#!/usr/bin/perl
use strict;
use GD::Barcode::QRcode;
 
my $str         = $ENV{'HTTP_REFERER'};
my $header      = qq(Content-Type: image/png\n\n);
my $qr          = GD::Barcode::QRcode->new($str,{ ECC => 'L', Version => 2, ModuleSize =>2,})->plot->png;
print $header,$qr;
exit;


- 各ページに以下の HTML で付加可能.
<img src="path/to/qr.cgi" width="97" height="97" alt="QRcode" />


- Reference
GD::Barcode::QRcode

nitsujiの日記 - GD::Barcode::QRcodeのバグ?の件について
http://d.hatena.ne.jp/nitsuji/20070626/1182840997

カテゴリ: [Perl][QRCode]

2006-03-05 Sun

GD::Barcode::QRcode を用いた QRコード生成

- Summary
http://example.com/cgi-bin/qr.cgi?q=QRコードにしたい文字列
でQRコードの画像を生成したい.

- 準備

# cpan -i GD::Barcode::QRcode


- 注意
GD::Barcode::QRcode (0.01) 40行目を変更

#$oSelf->{Version} = $rhPrm->{Version} || 1;
$oSelf->{Version} = $rhPrm->{Version};


- Source
#!/usr/bin/perl
use strict;
use CGI;
use GD::Barcode::QRcode;
 
my $q		= new CGI;
my $str		= $q->param('q');
my $header	= qq(Content-Type: image/png\n\n);
my $qr		= GD::Barcode::QRcode->new($str)->plot->png;
print $header,$qr;
exit;


- Reference
GD::Barcode::QRcode
Debian パッケージディレクトリ検索 (バイナリ) - libgd-graph-perl

どんぞこ日誌(2004-07-25)
http://donzoko.net/cgi-bin/tdiary/20040725.html

カテゴリ: [Perl][QRCode]
内部リンク: [2006-03-06-1]

2006-02-21 Tue

アートワークを Perl で設定する方法

- Reference
NamingSense::TokuLog! - アートワークを Perl で設定する方法
http://d.hatena.ne.jp/tokuhirom/20060218/1140279373

カテゴリ: [iTunes][Perl][Stub]

2006-01-30 Mon

Number::Phone::JP - 日本の電話番号のValidator

- Synopsis

use Number::Phone::JP;
 
my $tel = Number::Phone::JP->new('012', '34567890');
print "This is valid!!\n" if $tel->is_valid_number;
 
$tel->set_number('098 7654 3210');
print "This is valid!!\n" if $tel->is_valid_number;
 
$tel->import(qw(mobile PHS));
$tel->set_number('090-0123-4567');
print "This is valid!!\n" if $tel->is_valid_number;


- Reference
Number::Phone::JP

- via
にぽたん研究所 - 2005-03-29 - 本邦初公開!電話番号の正規表現
http://blog.livedoor.jp/nipotan/archives/17526053.html

カテゴリ: [Perl]

2006-01-30 Mon

Regexp::Assemble - 正規表現ジェネレータ

- Summary
add() メソッドに渡した文字列や正規表現の全てにマッチする正規表現を作ってくれるモジュール.

- Synopsis

use Regexp::Assemble;
 
my $ra = Regexp::Assemble->new;
$ra->add( 'ab+c' );
$ra->add( 'ab+-' );
$ra->add( 'a\w\d+' );
$ra->add( 'a\d+' );
print $ra->re; # prints a(?:\w?\d+|b+[-c])


- Reference
Regexp::Assemble

にぽたん研究所 - 2005-03-29 - 本邦初公開!電話番号の正規表現
http://blog.livedoor.jp/nipotan/archives/17526053.html

blog.bulknews.net - 2005-03-30 - Regexp::Assemble: blog.bulknews.net
http://blog.bulknews.net/mt/archives/001617.html

- via
NamingSense::TokuLog! - 2006-01-28 - 郵便番号に厳密にマッチする正規表現
http://d.hatena.ne.jp/tokuhirom/20060128/1138433449

カテゴリ: [Perl]

2006-01-19 Thu

pmtools - Perl のモジュールや POD に関する小さなコマンドラインツール

- Summary
Perl のモジュールや POD に関する小さなコマンドラインツールが同梱されてるパッケージ.

- Reference
pmtools

use Perl | pmtools-1.00 Now on CPAN
http://use.perl.org/articles/06/01/13/1950245.shtml

- via
naoyaのはてなダイアリー - pmtools
http://d.hatena.ne.jp/naoya/20060114/1137217478

カテゴリ: [Perl]

2006-01-19 Thu

perlsh - perlでインタラクティブなシェル

- Summary
Term::ReadLine::Gnu に含まれている perlsh でインタラクティブシェル.
cpan install ではインストールされない.
使用するにはソースを展開して,ファイル群に含まれる perlsh を適切な場所におく必要がある.

- Reference
2nd life - perl でインタラクティブなシェルを実現する perlsh
http://d.hatena.ne.jp/secondlife/20060111/1136975310

Term::ReadLine::Gnu

- via
cl.pocari.org - perl でインタラクティブなシェルを実現する perlsh
http://cl.pocari.org/2006-01-11-7.html/

カテゴリ: [Perl]

2006-01-18 Wed

Perl で TypeKey 認証

- Authen::TypeKey
Synopsis

use CGI;
use Authen::TypeKey;
my $q = CGI->new;
my $tk = Authen::TypeKey->new;
$tk->token('typekey-token');
my $res = $tk->verify($q) or die $tk->errstr;


- Apache::AuthTypeKey
Synopsis
## In httpd.conf or .htaccess:
PerlModule Apache::AuthTypeKey
PerlSetVar TypeKeyPath /
PerlSetVar TypeKeyLoginScript /login.pl
 
## These documents require user to be logged in.
<Location /protected>
	AuthType          Apache::AuthTypeKey
	AuthName          TypeKey
	PerlAuthenHandler Apache::AuthTypeKey->authenticate
	require           valid-user
	PerlSetVar        TypeKeyToken your_token
</Location>
 
## This is the _return URL that the login.pl script should point to.
<Location /login-protected>
	AuthType    Apache::AuthTypeKey
	AuthName    TypeKey
	SetHandler  perl-script
	PerlHandler Apache::AuthTypeKey->login
	PerlSetVar  TypeKeyToken your_token
</Location>


- Reference
YukiWiki - TypeKey
http://www.hyuki.com/yukiwiki/wiki.cgi?TypeKey

Authen::TypeKey
Apache::AuthTypeKey

カテゴリ: [Perl]

2006-01-04 Wed

メールアドレスが正しいかを判定するモジュール

- Email::Valid

#!/usr/bin/perl
use Email::Valid;
print (Email::Valid->address('user@example.com') ? 'yes' : 'no');


- Mail::CheckUser
#!/usr/bin/perl
use Mail::CheckUser qw(check_email last_check);
 
my $email = 'user@example.com';
 
if(check_email($email)) {
	print "E-mail address <$email> is OK\n";
} else {
	print "E-mail address <$email> isn't valid: ", last_check()->{reason}, "\n";
}


- Data::Validate::Email
use Data::Validate::Email qw(is_email is_email_rfc822);
 
if(is_email($suspect)){
	print "Looks like an email address\n";
} elsif(is_email_rfc822($suspect)){
	print "Doesn't much look like an email address, but passes rfc822\n";
} else {
	print "Not an email address\n";
}


- Reference
Email::Valid
Debian パッケージディレクトリ検索 (バイナリ) - libemail-valid-perl

Mail::CheckUser

Data::Validate::Email

カテゴリ: [Perl]

2006-01-04 Wed

HTML::Prototypeの使い方

- Reference
HTML::Prototype

mizzy.org - Catalystでajax (HTML::Prototypeモジュールの使い方)
http://mizzy.org/program/htmlPrototype.html

blog.nomadscafe.jp: HTML::Prototypeを使ったauto complete field
http://blog.nomadscafe.jp/archives/000462.html

autocomplete filed sample
http://nomadscafe.jp/test/autocompletefield/app.cgi/

カテゴリ: [Perl][Stub]

2006-01-04 Wed

XML::Simple + JSON で Ajax

1. [Perl] XML over HTTP な API を叩く
2. [Perl] XML::Simple で parse
3. [Perl] そのまま objToJson でJSONに変換
4. [JavaScript] XMLHttpRequest で結果取得
5. [JavaScript] JSON を eval
6. [JavaScript] 復元したデータで DHTML

JKL.ParseXML[2005-10-21-1]でクライアント側でXMLをparseしてもOK.

- Reference
JSON
XML::Simple

- via
はてな技術勉強会 - 2005年08月26日
http://www.hatena.ne.jp/info/tech#tech050826

カテゴリ: [Perl][Ajax]
2008-12 / 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
最終更新時間: 2008-12-02 10:52

Color Reference

ChangeLogを検索
携帯電話からアクセス!

カテゴリ

最近の話題

リンク

過去ログ

Google

QR Code

Since
2002-11-28
Update
2008-12-02 10:52
Copyright © 2005 xight.org All Rights Reserved.