/[cvs]/nfo/perl/libs/libsetup.pm
ViewVC logotype

Diff of /nfo/perl/libs/libsetup.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by cvsjoko, Sat Jul 27 00:28:36 2002 UTC revision 1.3 by joko, Sun Dec 1 22:12:25 2002 UTC
# Line 3  Line 3 
3  #  $Id$  #  $Id$
4  #  #
5  #  $Log$  #  $Log$
6    #  Revision 1.3  2002/12/01 22:12:25  joko
7    #  + changed status-flags: 0 => 'notok'   1 => 'ok'
8    #
9    #  Revision 1.2  2002/10/25 11:38:50  joko
10    #  + sub checkCommonDeps
11    #  + sub checkDeps_orig
12    #  + refactored sub checkDeps
13    #
14  #  Revision 1.1  2002/07/27 00:28:36  cvsjoko  #  Revision 1.1  2002/07/27 00:28:36  cvsjoko
15  #  + new  #  + new
16  #  #
# Line 62  use warnings; Line 70  use warnings;
70    }    }
71    
72    
73  sub checkDeps {  sub checkCommonDeps {
74      checkDeps_orig(\@modules);
75    }
76    
77    sub checkDeps_orig {
78      my $modules = shift;
79      my @modules = @{$modules};
80    map {    map {
81      #print $_, "\n";      #print $_, "\n";
82      print "testing for \"$_\" ...";      print "testing for \"$_\" ...";
# Line 83  sub checkDeps { Line 97  sub checkDeps {
97    } @modules;    } @modules;
98  }  }
99    
100    sub checkDeps {
101      my $modules = shift;
102      my @modules = @{$modules};
103      my $result;
104      map {
105        my $evalcmd = "use $_;";
106        eval($evalcmd);
107        if ($@) {
108          $result->{$_} = 'notok';
109        } else {
110          $result->{$_} = 'ok';
111        }
112      } @modules;
113      return $result;
114    }
115    
116  1;  1;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.3

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed