# Blosxom Plugin: cat # Author(s): Fukazawa Tsuyoshi # Version: 1.0 # Blosxom Home/Docs/Licensing: http://www.blosxom.com/ # 使い方: # $blosxom::plugin_dir/states/ディレクトリにテキストファイルを置き、 # foot.(フレーバー名)のどこかに と書くと、 # ファイルの中身をそのままそこに展開します package cat; use strict; use FileHandle; my $fh; sub start { return 1; } sub foot { my($pkg, $currentdir, $foot_ref) = @_; $$foot_ref =~ s//catout($1)/ige; return 1; } sub catout { my $file = shift; my $text; $fh = new FileHandle; if ($fh->open($blosxom::plugin_dir . "/states/" . $file)) { $text = join('', <$fh>); } $fh->close(); return $text; } 1;