diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-10-31 09:04:18 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-10-31 09:04:18 +0800 |
commit | a2834d7c52ba401accfcee956a5d7934448588a8 (patch) | |
tree | b0a0e087cdaf34936e44b195185bc68d110d10d7 | |
parent | 1fb79c5b83038a94e3412ebbf24c4dd4d76ad224 (diff) | |
download | pttbbs-a2834d7c52ba401accfcee956a5d7934448588a8.tar pttbbs-a2834d7c52ba401accfcee956a5d7934448588a8.tar.gz pttbbs-a2834d7c52ba401accfcee956a5d7934448588a8.tar.bz2 pttbbs-a2834d7c52ba401accfcee956a5d7934448588a8.tar.lz pttbbs-a2834d7c52ba401accfcee956a5d7934448588a8.tar.xz pttbbs-a2834d7c52ba401accfcee956a5d7934448588a8.tar.zst pttbbs-a2834d7c52ba401accfcee956a5d7934448588a8.zip |
add loadSerialized
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1282 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rwxr-xr-x | blog/blog.pl | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/blog/blog.pl b/blog/blog.pl index 6b75bc15..dcb272c7 100755 --- a/blog/blog.pl +++ b/blog/blog.pl @@ -14,6 +14,7 @@ use DBD::mysql; use POSIX; use MD5; use Mail::Sender; +use Data::Serializer; use vars qw/@emonth @cnumber %config %attr %article %th $dbh $brdname/; @@ -308,6 +309,20 @@ $comment }); } + # serialized ------------------------------------------------------------- + if( $attr{"$fn.loadSerialized"} ){ + my($obj, %h, $str); + $obj = Data::Serializer->new(serializer => 'Storable', + digester => 'MD5', + compress => 0, + ); + open FH, '<'.$attr{"$fn.loadSerialized"}; + FH->read($str, 104857600); + close FH; + %h = %{$obj->deserialize($str)}; + $th{$_} = $h{$_} foreach( keys %h ); + } + # ¥Î Template Toolkit ¿é¥X mkdir "$BLOGCACHE/$brdname"; $tmpl = Template->new({INCLUDE_PATH => '.', |