Changeset 1926

Show
Ignore:
Timestamp:
02/28/07 06:36:50
Author:
miyagawa
Message:

friendly error message if loading deps YAML failed

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/Makefile.PL

    r1837 r1926  
    8686while (my $f = $dh->read) { 
    8787    next unless $f =~ /\.yaml$/; 
    88     my $meta = YAML::LoadFile( File::Spec->catfile("deps", $f) ); 
     88    my $meta = eval { YAML::LoadFile( File::Spec->catfile("deps", $f) ) }; 
     89    if ($@) { 
     90        warn "Loading deps/$f failed: $@"; 
     91        next; 
     92    } 
    8993    push @plugins, $meta if !$meta->{platform} || $meta->{platform} eq $^O; 
    9094}