diff options
-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 => '.', |