Changeset 30790

Show
Ignore:
Timestamp:
03/04/09 11:20:26 (13 months ago)
Author:
tokuhirom
Message:

encode(undef, 'str') should die more earlier

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/Encode/trunk/Encode.pm

    r30121 r30790  
    147147    $string .= '' if ref $string;    # stringify; 
    148148    $check ||= 0; 
     149    unless ( defined $name ) { 
     150        require Carp; 
     151        Carp::croak("Encoding name should not be undef"); 
     152    } 
    149153    my $enc = find_encoding($name); 
    150154    unless ( defined $enc ) {