From b221278d97330299db38f7f179c8d4553e75c42a Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Fri, 17 Sep 2010 22:26:56 +0200 Subject: [PATCH] NewsStats.pm: Warn when -p takes precedence over -m. Signed-off-by: Thomas Hochstein --- NewsStats.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NewsStats.pm b/NewsStats.pm index ed76737..34635c1 100644 --- a/NewsStats.pm +++ b/NewsStats.pm @@ -200,6 +200,8 @@ sub GetTimePeriod { my ($Month,$Period) = @_; # exit if -m is set and not like YYYY-MM die "$MySelf: E: Wrong date format - use '$MySelf -m YYYY-MM'!\n" if not &CheckMonth($Month); + # warn if -m and -p is set + warn "$MySelf: W: Time period assigned by '-p' takes precendece over month assigned by '-m'.\n" if ($Month && $Period); # default: set -m to last month $Month = &LastMonth if (!defined($Month) and !defined($Period)); # set $StartMonth, $EndMonth -- 2.20.1