Changeset 46

Show
Ignore:
Timestamp:
04/23/09 19:29:51 (5 years ago)
Author:
cschammel
Message:

md5_hex barfs if contents are UTF-8 characters, however you can use perl's representation of UTF-8 instead. More info http://perldoc.perl.org/Digest/MD5.html

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/Mungo.pm

    r41 r46  
    189189use Mungo::Error; 
    190190use HTML::Entities; 
     191use Encode; 
    191192 
    192193use vars qw/$VERSION 
     
    380381  my $type = ref $self; 
    381382  $type =~ s/::(?:File|Mem)Page::[^:]+$//; 
    382   return $type . "::MemPage::" . md5_hex($$contents); 
     383  return $type . "::MemPage::" . md5_hex( encode_utf8($$contents) ); 
    383384} 
    384385