From 24d6bd69dc6ec0152aaf21a1e09a930c517b743d Mon Sep 17 00:00:00 2001 From: Andrew Ruthven Date: Fri, 30 Nov 2007 08:16:59 +1300 Subject: [PATCH] Let Getopt::Long do the input validation for port. --- bin/mythtv-status | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bin/mythtv-status b/bin/mythtv-status index cc674fc..cdd7100 100755 --- a/bin/mythtv-status +++ b/bin/mythtv-status @@ -38,7 +38,7 @@ GetOptions( 'd|descripton' => \$description, 'e|episode' => \$episode, 'h|host=s' => \$host, - 'p|port=s' => \$port, + 'p|port=i' => \$port, 'v|version' => \&print_version, 'email=s@' => \@email, 'email-only-on-conflict' => \$email_only_on_conflict, @@ -61,9 +61,6 @@ GetOptions( pod2usage(verbose => 1) if defined $help; -die "Sorry, port isn't a number.\n" - if $port !~ /^\d+$/; - # Get the email address into a format we can use. @email = split(',', join(',', @email)); -- 2.30.2