App-Getconf

 view release on metacpan or  search on metacpan

lib/App/Getconf.pm  view on Meta::CPAN


      push @errors, $self->_try_set($option, $option_name, $option_arg);

      # }}}
    } elsif ($args[$i] =~ /^--([a-zA-Z0-9-]+)$/) {
      # long option, possible parameter in next argument {{{

      $option_name = $1;
      $option = $args[$i];

      # there's no option of exactly the same name, but the --option looks
      # like a negation of Boolean
      if (!$self->has_option($option_name) && $option_name =~ /^no-/) {
        my $negated_name = substr $option_name, 3;

        # there is an option without "--no-" prefix and that option is
        # a Boolean, so it might be actually negated
        if ($self->has_option($negated_name) &&
            $self->option_node($negated_name)->type() eq 'bool') {
          $option_name = $negated_name;
          $option = "--$negated_name";

lib/App/Getconf.pm  view on Meta::CPAN

  return opt { type => 'string' };
}

=item C<opt_path()>

Option specifying a path in local filesystem.

=cut

sub opt_path() {
  # TODO: some checks on how this looks like
  #   * existing file
  #   * existing directory
  #   * non-existing file (directory exists)
  #   * Maasai?
  return opt { type => 'string' };
}

=item C<opt_hostname()>

Option specifying a hostname.



( run in 0.574 second using v1.01-cache-2.11-cpan-64827b87656 )