/usr/share/doc/libnews-scan-perl/examples/news-scan is in libnews-scan-perl 0.53-3.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | #! /usr/local/bin/perl -w
use strict;
use Data::Dumper 'DumperX';
use News::Scan;
my %aliases = (
'gbacon@hiwaay.net' => 'gbacon@cs.uah.edu',
);
my @exclude = (
'perlfaq-suggestions\@(?:.*\.)?perl\.com',
);
my $HOME = $ENV{HOME} || '/';
my $spool = "$HOME/spool/comp.lang.perl.misc";
my $scan = new News::Scan Group => 'comp.lang.perl.misc',
Spool => $spool,
Period => 7,
Aliases => \%aliases,
Exclude => \@exclude,
From => 'spool';
unless (defined $scan) {
die "$0: Failed to create News::Scan object!\n";
}
elsif ($scan->error) {
die "$0: Error: " . $scan->error . "\n";
}
$scan->scan;
if ($scan->error) {
die "$0: Error: " . $scan->error . "\n";
}
$Data::Dumper::Indent = 0; ## minimal whitespace
$Data::Dumper::Purity = 1; ## get correct topology at any cost
print DumperX $scan;
exit;
|