App-reposdb

 view release on metacpan or  search on metacpan

script/reposdb-inline  view on Meta::CPAN

        'sort=s@' => {
          handler => sub { if ($mentioned_args{'sorts'}++) { push @{ $_pci_args{'sorts'} }, $_[1] } else { $_pci_args{'sorts'} = [$_[1]] } },
        },
        'sorts-json=s' => {
          handler => sub { $_pci_args{'sorts'} = _pci_json()->decode($_[1]); },
        },
      },
    },
    'remove-all-tags' => {
      options => {
        'repo=s' => {
          handler => sub { $_pci_args{'repo'} = $_[1]; },
        },
        'reposdb-path=s' => {
          handler => sub { $_pci_args{'reposdb_path'} = $_[1]; },
        },
      },
    },
    'remove-tag' => {
      options => {
        'repo=s' => {
          handler => sub { $_pci_args{'repo'} = $_[1]; },
        },
        'reposdb-path=s' => {
          handler => sub { $_pci_args{'reposdb_path'} = $_[1]; },
        },
        'tag=s@' => {
          handler => sub { if ($mentioned_args{'tags'}++) { push @{ $_pci_args{'tags'} }, $_[1] } else { $_pci_args{'tags'} = [$_[1]] } },
        },
        'tags-json=s' => {
          handler => sub { $_pci_args{'tags'} = _pci_json()->decode($_[1]); },
        },
      },
    },
    'touch' => {
      options => {
        'commit-time' => {
          handler => sub { $_pci_args{'commit_time'} = $_[1]; },
        },
        'pull-time' => {
          handler => sub { $_pci_args{'pull_time'} = $_[1]; },
        },
        'repo=s' => {
          handler => sub { $_pci_args{'repo'} = $_[1]; },
        },
        'reposdb-path=s' => {
          handler => sub { $_pci_args{'reposdb_path'} = $_[1]; },
        },
        'status-time' => {
          handler => sub { $_pci_args{'status_time'} = $_[1]; },
        },
        'to=s' => {
          handler => sub { $_pci_args{'to'} = $_[1]; },
        },
      },
    },
  },
  default_subcommand => undef,
};
{
  local @ARGV = @ARGV;
  my $old_conf = Getopt::Long::EvenLess::Configure("pass_through");
  Getopt::Long::EvenLess::GetOptions(%$go_spec1);
  Getopt::Long::EvenLess::Configure($old_conf);
  { my $first_non_opt_arg; for (@ARGV) { next if /^-/; $first_non_opt_arg = $_; last } if (!length $_pci_r->{subcommand_name} && defined $first_non_opt_arg) { $_pci_r->{subcommand_name} = $first_non_opt_arg } }
}
{
  last unless $_pci_r->{read_env};
  my $env = $ENV{"REPOSDB_INLINE_OPT"};
  last unless defined $env;
  require Complete::Bash;
  my ($words, undef) = @{ Complete::Bash::parse_cmdline($env, 0) };
  unshift @ARGV, @$words;
}
if ($_pci_r->{read_config}) {
  require Perinci::CmdLine::Util::Config;

  my $res = Perinci::CmdLine::Util::Config::read_config(
    config_paths     => $_pci_r->{config_paths},
    config_filename  => "reposdb-inline.conf",
    config_dirs      => undef // ["$ENV{HOME}/.config", $ENV{HOME}, "/etc"],
    program_name     => "reposdb-inline",
  );
  _pci_err($res) unless $res->[0] == 200;
  $_pci_r->{config} = $res->[2];
  $_pci_r->{read_config_files} = $res->[3]{"func.read_files"};
  $_pci_r->{_config_section_read_order} = $res->[3]{"func.section_read_order"}; # we currently dont want to publish this request key

  $res = Perinci::CmdLine::Util::Config::get_args_from_config(
    r                  => $_pci_r,
    config             => $_pci_r->{config},
    args               => \%_pci_args,
    program_name       => "reposdb-inline",
    subcommand_name    => $_pci_r->{subcommand_name},
    config_profile     => $_pci_r->{config_profile},
    common_opts        => {},
    meta               => $_pci_metas->{ $_pci_r->{subcommand_name} },
    meta_is_normalized => 1,
  );
  die $res unless $res->[0] == 200;
  my $found = $res->[3]{"func.found"};
  if (defined($_pci_r->{config_profile}) && !$found && defined($_pci_r->{read_config_files}) && @{$_pci_r->{read_config_files}} && !$_pci_r->{ignore_missing_config_profile_section}) {
    _pci_err([412, "Profile '$_pci_r->{config_profile}' not found in configuration file"]);
  }
}
my $res = Getopt::Long::Subcommand::GetOptions(%$go_spec2);
_pci_err([500, "GetOptions failed"]) unless $res->{success};
if (!length $_pci_r->{subcommand_name}) { print $help_msg; exit 0 }
}

### check arguments

{
my $res = _pci_check_args(\%_pci_args);
_pci_err($res) if $res->[0] != 200;
$_pci_r->{args} = \%_pci_args;
}

### call function

{

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.475 second using v1.00-cache-2.02-grep-82fe00e-cpan-f5108d614456 )