2 #####################################################################
4 # Check system dependences between php-pear modules #
6 # Pawe³ Go³aszewski <blues@ds.pg.gda.pl> #
7 # Micha³ Moskal <malekith@pld-linux.org> #
8 # ------------------------------------------------------------------#
10 # - extension_loaded - dependencies. #
11 # - some clean-up... #
12 #####################################################################
14 $pear = "/usr/share/pear";
19 foreach (@ARGV ? $ARGV : <> ) {
24 next unless ($f =~ /\.php$/);
25 open(F, "< $f") or die;
29 $file_dir =~ s|.*$pear/||;
30 $file_dir =~ s|/[^/]*$||;
37 next if (/^\s*(#|\/\/|\*|\/\*)/);
39 while (/(\W|^)(require|include)(_once)?
40 \s* \(? \s* ("([^"]*)"|'([^']*)')
50 next if ($x =~ m|^\./| or $x =~ /\$/);
51 next unless ($x =~ /\.php$/);
55 next unless (defined $file_dir);
57 while (/(\W|^)(require|include)(_once)?
58 \s* \(? \s* dirname \s* \( \s* __FILE__ \s* \) \s* \. \s*
70 next unless ($x =~ /\.php$/);
79 f: for $f (keys %req) {
80 for $g (@files) { next f if ($g =~ /\Q$f\E$/); }