Subject: | API change of read_dir() |
You've changed the API of File::Slurp::read_dir().
This broke some of my production code.
I consider this to be contrary to our agreement.
How many other people's code did you break too?
What it broke was my postfix mailq summerizer:
#!/usr/bin/perl
my $qdgp = "/var/spool/postfix";
my @qdp = qw(active deferred incoming hold corrupt maildrop);
my @sd = (qw(0 1 2 3 4 5 6 7 8 9 A B C D E F));
use File::Slurp;
print "postfix queue sizes:\n";
my $t = 0;
for my $qdp (@qdp) {
my $c = 0;
if (-e "$qdgp/$qdp/0") {
for my $sd (@sd) {
$c += scalar(read_dir("$qdgp/$qdp/$sd"));
}
} else {
$c = scalar(read_dir("$qdgp/$qdp"));
}
$t += $c;
printf "%9s% 8d\n", "$qdp:", $c;
}
printf "%9s% 8d\n", "total:", $t;