We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The output of the code below on Ubuntu 16.04 (everything from Ubuntu repo) gives:
:!./test.pl -t 127.0.0.1 --ip ip: 1 Use of uninitialized value in print at ./test.pl line 18. Status:
But about 50% of the times it gives the expected output:
:!./test.pl -t 127.0.0.1 --ip ip: 1 Status: open
Code:
#!/usr/bin/perl -w -T use strict; use Getopt::Long::Descriptive; my ($opt, $usage) = describe_options( '', [ 'ip', "Get WAN IP address" ], [ 'status=s', "Change service status", { callbacks => { 'Accepted status values are: OPEN, CLOSE' => sub { $_[0] =~ /^(open|close)$/ } } } ], [ 'target|t=s', "Target IPv4 when a port is opened", { implies => { status => 'open' }, callbacks => { 'Valid ipv4' => sub { $_[0] =~ /^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$/ } } } ], ); print "\nip: ", $opt->ip(), "\nStatus: ", $opt->status(), "\n"; exit;
The text was updated successfully, but these errors were encountered:
Issue is still there in v0.109 (current trunk)
Sorry, something went wrong.
No branches or pull requests
The output of the code below on Ubuntu 16.04 (everything from Ubuntu repo) gives:
But about 50% of the times it gives the expected output:
Code:
The text was updated successfully, but these errors were encountered: