| 1 | package P5U::Command::Whois; | ||
| 2 | |||
| 3 | use 5.010; | ||
| 4 | use strict; | ||
| 5 | use utf8; | ||
| 6 | use P5U-command; | ||
| 7 | |||
| 8 | BEGIN { | ||
| 9 | $P5U::Command::Whois::AUTHORITY = 'cpan:TOBYINK'; | ||
| 10 | $P5U::Command::Whois::VERSION = '0.100'; | ||
| 11 | }; | ||
| 12 | |||
| 13 | use constant { | ||
| 14 | abstract => q[whois for CPAN authors], | ||
| 15 | usage_desc => q[%c whois CPANID], | ||
| 16 | }; | ||
| 17 | |||
| 18 | sub command_names {qw{ whois w }} | ||
| 19 | |||
| 20 | sub opt_spec | ||
| 21 | { | ||
| 22 | return ( | ||
| 23 | [ 'verbose|v' => 'show extra information' ], | ||
| 24 | ); | ||
| 25 | } | ||
| 26 | |||
| 27 | sub execute | ||
| 28 | { | ||
| 29 | require P5U::Lib::Whois; | ||
| 30 | my ($self, $opt, $args) = @_; | ||
| 31 | |||
| 32 | while (@$args) | ||
| 33 | { | ||
| 34 | print P5U::Lib::Whois | ||
| 35 | -> new(cpanid => shift @$args) | ||
| 36 | -> report($opt->{verbose}); | ||
| 37 | print "\n" if @$args; | ||
| 38 | } | ||
| 39 | } | ||
| 40 | |||
| 41 | 1; |