Changeset 2006

Show
Ignore:
Timestamp:
10/07/06 22:38:25
Author:
miyagawa
Message:

use YAML::Syck to avoid segfaults

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • misc/todo.pl

    r1983 r2006  
    1111 
    1212use Encode (); 
    13 use YAML (); 
     13use YAML::Syck (); 
    1414use LWP::UserAgent; 
    1515use Number::RecordLocator; 
     
    131131sub load_config { 
    132132    return unless(-e $CONFFILE); 
    133     %config = %{YAML::LoadFile($CONFFILE) || {}}; 
     133    %config = %{YAML::Syck::LoadFile($CONFFILE) || {}}; 
    134134    my $sid = $config{sid}; 
    135135    if($sid) { 
     
    186186 
    187187sub save_config { 
    188     YAML::DumpFile($CONFFILE, \%config); 
     188    YAML::Syck::DumpFile($CONFFILE, \%config); 
    189189    chmod 0600, $CONFFILE; 
    190190} 
     
    420420                      query  => $query, 
    421421                      format => 'yaml'); 
    422     return YAML::Load($result->{_content}{result}); 
     422    return YAML::Syck::Load($result->{_content}{result}); 
    423423} 
    424424 
     
    436436 
    437437    if ( $res->is_success ) { 
    438         return YAML::Load( Encode::decode_utf8($res->content) )->{fnord}; 
     438        return YAML::Syck::Load( Encode::decode_utf8($res->content) )->{fnord}; 
    439439    } else { 
    440440        die $res->status_line; 
     
    457457        print ref($message) ? $message->() . "\n" : "$message\n"; 
    458458    } else { 
    459         die(YAML::Dump($result)); 
     459        die(YAML::Syck::Dump($result)); 
    460460    } 
    461461