PCAP::Cli(3)

NAME
PCAP::Cli - Collection of functions for checking inputs.

  Methods

file_for_reading
    Checks input is an existing file with size.

      my $checked = PCAP::Cli::file_for_reading($option_name, $option_value);

    The name of the option is used to aid in generating informative messages to the user.

out_dir_check
    Checks if provided path is present and writable, if not will attempt to create.

      my $checked = PCAP::Cli::out_dir_check($option_name, $option_value);

    The name of the option is used to aid in generating informative messages to the user.

valid_process
    Simple function to abstract generic checking of command line process types.

      PCAP::Cli::valid_process('name of thing to check', 'value to check', [valid values]);

    Errors if value is invalid

valid_index_by_factor
    Check an index is within the range for the data being processed.

opt_requires_opts
    Abstracts checking for options which have dependencies on others

      PCAP::Cli::valid_process('name of option', {option set}, [dependencies]);