]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- efficent function use
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 2 Dec 2009 13:37:53 +0000 (13:37 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    rpm-php-requires.php -> 1.9

rpm-php-requires.php

index ac832081789812cb006a3ad60217051cc308ddf5..4d6ae3e80a6e9812b4bd0033b88173d60a362fad 100644 (file)
@@ -7,6 +7,9 @@
  * Paweł Gołaszewski <blues@pld-linux.org> (Perl version)
  * Michał Moskal <malekith@pld-linux.org> (Perl version)
  * Elan Ruusamäe <glen@pld-linux.org>
+ *
+ * Requires: php-pear-PHP_CompatInfo
+ * Requires: php-pcre
  */
 
 /**
@@ -34,7 +37,7 @@ function peardeps($files) {
                        $file_dir = null;
                }
 
-               foreach (explode(PHP_EOL, file_get_contents($f)) as $line) {
+               foreach (file($f) as $line) {
                        // skip comments
                        if (preg_match('/^\s*(#|\/\/|\*|\/\*)/', $line)) {
                                continue;
@@ -100,7 +103,7 @@ function peardeps($files) {
                if (array_key_exists($f, $files)) {
                        continue;
                }
-               print "pear($f)\n";
+               echo "pear($f)\n";
        }
 }
 
This page took 0.039991 seconds and 4 git commands to generate.