GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Test2::Harness::Settings(3) User Contributed Perl Documentation Test2::Harness::Settings(3)

Test2::Harness::Settings - Configuration settings for Test2::Harness.

This module represents the options provided at the command line. Each option has a prefix, and each prefix can be accessed from the settings.

    # You will rarely if ever need to construct settings yourself, usually a
    # component of Test2::Harness will expose them to you.
    my $settings = $thing->settings;

    # All prefixes have a method generated for them via AUTOLOAD
    my $display = $settings->display;

    # You can also use the prefix method
    my $display = $settings->prefix('display');


    # The prefix can be used in a similar way
    my $verbose = $settings->display->verbose;

See Test2::Harness::Settings::Prefix for more details on how to use the prefixes.

Note that any prefix that does not conflict with the predefined methods can be accessed via AUTOLOAD generating the methods as needed.
$settings->define_prefix($prefix_name)
This is used to create a prefix.
$bool = $settings->check_prefix($prefix_name)
This is used to check if a prefix is defined or not.
$prefix = $settings->prefix($prefix_name)
$prefix = $settings->$prefix_name
This will retrieve a prefix if it exists. If the prefix is not defined this will throw an exception. If you are unsure if a prefix exists use "$settings-"check_prefix($prefix_name)>.
$thing = $settings->build($prefix_name, $class, @args)
This will create an instance of $class passing the key/value pairs from the specified prefix as arguments. Additional arguments can be provided in @args.
$hashref = $settings->TO_JSON()
This method allows settings to be serialized into JSON.

The source code repository for Test2-Harness can be found at http://github.com/Test-More/Test2-Harness/.

Chad Granum <exodist@cpan.org>

Chad Granum <exodist@cpan.org>

Copyright 2020 Chad Granum <exodist7@gmail.com>.

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

See http://dev.perl.org/licenses/

2022-03-23 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.