Benchmark-Featureset-ParamCheck

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

      use Module::Runtime qw(use_module);
  
      my @impl     = Benchmark::Featureset::ParamCheck->implementations;
      my $testdata = Benchmark::Featureset::ParamCheck->trivial_named_data;
  
      for my $i (@impl) {
        # Check the data 10,000 times.
        use_module($i)->run_named_check(10_000, $testdata);
      }

DESCRIPTION
    A whole bunch of implementations for sub paramater checking.

    Each implementation provides a method to check a hash of the form shown in
    the example. It should have three keys, 'integer' (value should be an
    integer), 'hashes' (value should be an arrayref of hashrefs), and 'object'
    (value should be an object with `print` and `close` methods).

    This is intended for benchmarking.

  Class Methods
    *   `implementations`

        List of implementations. Each implementation is a subclass of
        Benchmark::Featureset::ParamCheck::Base

    *   `trivial_named_data`, `trivial_positional_data`

        Returns trivial test data.

    *   `complex_named_data`, `complex_positional_data`

        Returns complex test data.

  Benchmark::Featureset::ParamCheck::Base
    This class provides the following class methods:

    *   `accept_array`

    *   `accept_arrayref`

    *   `accept_hash`

    *   `accept_hashref`

    *   `run_named_check($times, %parameters)`, `run_named_check($times,
        \%parameters)`

    *   `run_postional_check($times, @parameters)`

BUGS
    Please report any bugs to
    <https://github.com/tobyink/p5-benchmark-featureset-paramcheck/issues>.

SEE ALSO
    Parameter validation libraries: Data::Validator, MooseX::Params::Validate,
    Params::Check, Params::Validate, Params::ValidationCompiler, Type::Params.

    Type constraint libraries: Moose, Mouse, Specio, Type::Tiny, Type::Nano.

    Other tested libraries: Ref::Util::XS.

AUTHOR
    Toby Inkster <tobyink@cpan.org>.

COPYRIGHT AND LICENCE
    This software is copyright (c) 2017, 2018, 2022 by Toby Inkster.

    This is free software; you can redistribute it and/or modify it under the
    same terms as the Perl 5 programming language system itself.

DISCLAIMER OF WARRANTIES
    THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
    WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
    MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

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

( run in 0.431 second using v1.00-cache-2.02-grep-82fe00e-cpan-2c419f77a38b )