Changeset 1885

Show
Ignore:
Timestamp:
11/29/06 12:02:24
Author:
miyagawa
Message:

force stringify id in Plagger::Util::safe_id

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Util.pm

    r1884 r1885  
    44our @EXPORT_OK = qw( strip_html dumbnail decode_content extract_title load_uri mime_type_of filename_for mime_is_enclosure ); 
    55 
    6 use Digest::MD5; 
    76use Encode (); 
    87use List::Util qw(min); 
     
    216215 
    217216sub safe_id { 
    218     my $id = shift; 
     217    my $id = "$_[0]"; # force stringify 
    219218    $id =~ s/^urn:guid://; 
    220219    $id =~ /^([\w\-]+)$/ ? $1 : Digest::MD5::md5_hex($id);