--- 1/Portage.pm +++ 1/Portage.pm @@ -705,12 +705,19 @@ } -# returns a list of all lines of a given file +# returns a list of all lines of a given file/dir # that are no pure comments -# Parameter 1: filename +# Parameter 1: filename/dirname sub _noncomments { my ($fname) = @_; my @result; + if(-d $fname) { + @result = (); + for my $i (_get_files_from_dir($fname)) { + (-f $i) && push @result, _noncomments($i); + } + return @result; + } local $/; if(open my $file, '<', $fname) { binmode( $file, ":encoding(UTF-8)" );