Amazon-API-Help
view release on metacpan or search on metacpan
lib/Amazon/API/Help.pm view on Meta::CPAN
package Amazon::API::Help;
use strict;
use warnings;
use Amazon::API::BuildInfo;
use CLI::Simple::Constants qw(:booleans :chars);
use CLI::Simple::Utils qw(slurp slurp_json choose);
use Carp;
use Data::Dumper;
use English qw(-no_match_vars);
use File::ShareDir qw(dist_file dist_dir);
use IO::Uncompress::Gunzip qw(gunzip);
use List::Util qw(max none);
use Pod::HTML2Pod;
use Pod::Text;
use Storable qw(retrieve);
use Template;
use parent qw(CLI::Simple);
our $VERSION = '1.0.3';
caller or exit __PACKAGE__->main();
########################################################################
sub init {
########################################################################
my ($self) = @_;
my $command = $self->command;
if ( none { $command eq $_ } keys %{ $self->commands } ) {
$self->set_args( [ $command, $self->get_args ] );
$self->command('help');
}
if ( $self->command eq 'help' ) {
my @candidates = ( 'botocore-services.api.gz', dist_file( 'Amazon-API-Help', 'botocore-services.api.gz' ) );
my ($services_file) = grep { defined $_ && -e $_ } @candidates;
my $services;
gunzip( $services_file, \$services );
my $service_meta = retrieve( \$services );
$self->set_services($service_meta);
}
my $version = Amazon::API::BuildInfo->version();
my $botocore_version = $version->{botocore_version};
$self->set_version($version);
$self->set_provenance(
{ version => $botocore_version->{version} // 'unknown',
commit => $botocore_version->{commit} // 'unknown'
}
);
return;
}
########################################################################
sub cmd_help {
########################################################################
my ( $self, $init_flag ) = @_;
( run in 2.300 seconds using v1.01-cache-2.11-cpan-c32d3c3b8f1 )