My Favorite Perl Modules
ゲストさん、ようこそ アカウント登録 | ログイン

お気に入り一覧 (file)

File::Path(File-Path)[MAS]
mkpath で一気に深いディレクトリが作れるので。
Tags: file
登録:2005-04-17 15:04:06
バージョンアップ:2009-10-05 01:01:04
File::Copy::move をよく使います。
Tags: file
登録:2005-04-17 15:01:54
バージョンアップ:2009-08-24 07:00:58
ファイル名を取り出すのにsplitを使ったりしているのを見ると、これを使えば良いのにといつも思います。
Tags: file
登録:2005-04-17 14:59:56
バージョンアップ:2009-08-24 07:00:52
my $data;
my $uri = 'http://mfpm.blogdb.jp/feeds/new_user_comments.rdf';
my $cache = Cache::File->new( cache_root => '/tmp/cache', default_expires => '600 sec' );
if ($cache->exists($uri)) {
  $data  = Storable::thaw($cache->get($uri))->{Content};
} else {
  my $rss   = URI::Fetch->fetch($uri , Cache => $cache ) or die URI::Fetch->errstr;
  $data = $rss->content;
}


こんな感じで書いておくと、手元にキャッシュが有る時にはHTTPしなくなる。
こうしておく事により、さらに負荷を減らせる。
Tags: cache file
登録:2005-02-21 16:10:09
バージョンアップ:2006-02-03 01:00:39
tags
mail(12)
db(27)
roll(24)
html(19)
cpan(1)
xml(13)
rss(4)
mobile(13)
time(8)
atom(2)
poe(4)
msn(2)
acme(3)
hash(3)
id(1)
http(4)
date(7)
ec(2)
swf(1)
qr(1)
exe(2)
qdbm(3)
test(8)
dbi(2)
php(3)
rpc(1)
uri(1)
log(3)
ip(2)
net(4)
gd(1)
debug(22)
cgi(28)
file(4)
web(6)
pugs(1)
pod(1)
conf(7)
wiki(4)
csv(4)
lwp(2)
rest(1)
dump(5)
aop(1)
mvc(2)
tt(3)
data(3)
url(1)
list(2)
cdbi(1)
feed(1)
typo(1)
2ch(1)
json(2)
rdb(1)
orm(4)
view(2)
math(1)
tool(1)
sns(1)
www(2)
fork(1)
sql(2)
app(4)
gis(1)
dev(1)
yaml(2)
dbic(1)
util(3)
carp(1)
dbix(1)
api(3)
atd(9)
sort(1)
pdf(1)
oop(1)
text(3)
tsv(3)
perl(1)
form(1)
©blogdb 2004-2005