diff options
Diffstat (limited to 'pyxis.pl')
-rwxr-xr-x | pyxis.pl | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pyxis.pl b/pyxis.pl index 96e2e9f..7aedba0 100755 --- a/pyxis.pl +++ b/pyxis.pl @@ -79,7 +79,11 @@ my %dispatch = ( : push @feeds, path($feeds_dir)->children; foreach my $feed (@feeds) { - die "pyxis: no such feed\n" unless -e $feed; + # Skip if feed file doesn't exist. + say "pyxis: unknown feed `$feed'" + and next + unless -e $feed; + for my $line ($feed->lines) { chomp $line; next if (substr($line, 0, 1) eq "#" @@ -94,6 +98,10 @@ my %dispatch = ( $twtxt{$date} = $entry; } } + # Exit if there are no feeds to load. + die "pyxis: no feed to load\n" + unless scalar keys %twtxt > 0; + require Time::Moment; my %epoch_twtxt; |