projects
/
usenet
/
newsstats.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change handling of warnings.
[usenet/newsstats.git]
/
NewsStats.pm
diff --git
a/NewsStats.pm
b/NewsStats.pm
index
bdfdcf5
..
bfcb37b
100644
(file)
--- a/
NewsStats.pm
+++ b/
NewsStats.pm
@@
-33,6
+33,7
@@
require Exporter;
SplitPeriod
ListMonth
ListNewsgroups
SplitPeriod
ListMonth
ListNewsgroups
+ ParseHierarchies
ReadGroupList
OutputData
FormatOutput
ReadGroupList
OutputData
FormatOutput
@@
-184,7
+185,7
@@
sub ListNewsgroups {
next if($TLH and !/^$TLH/);
# don't count invalid newsgroups
if(%ValidGroups and !defined($ValidGroups{$_})) {
next if($TLH and !/^$TLH/);
# don't count invalid newsgroups
if(%ValidGroups and !defined($ValidGroups{$_})) {
-
&Bleat(1,sprintf("DROPPED: %s
",$_));
+
warn (sprintf("DROPPED: %s\n
",$_));
next;
}
# add original newsgroup to %Newsgroups
next;
}
# add original newsgroup to %Newsgroups
@@
-230,8
+231,9
@@
sub ReadGroupList {
my %ValidGroups;
open (my $LIST,"<$Filename") or &Bleat(2,"Cannot read $Filename: $!");
while (<$LIST>) {
my %ValidGroups;
open (my $LIST,"<$Filename") or &Bleat(2,"Cannot read $Filename: $!");
while (<$LIST>) {
- s/^(\S+).*$/$1/;
+ s/^
\s*
(\S+).*$/$1/;
chomp;
chomp;
+ next if /^$/;
$ValidGroups{$_} = '1';
};
close $LIST;
$ValidGroups{$_} = '1';
};
close $LIST;
This page took
0.01075 seconds
and
4
git commands to generate.