NAME
Venus::Test - Test Class
ABSTRACT
Test Class for Perl 5
SYNOPSIS
package main;
use Venus::Test;
my $test = Venus::Test->new('t/Venus_Test.t');
# $test->for('name');
# $test->for('tagline');
# $test->for('abstract');
# $test->for('synopsis');
# $test->done;
DESCRIPTION
This package aims to provide a standard for documenting Venus derived software projects, a framework writing tests, test automation, and documentation generation. This package will automatically exports true, false, and "test" keyword functions.
SPECIFICATION
This section describes the specification format used by Venus::Test to generate documentation and automate testing for Perl packages. The specification uses specially formatted POD blocks that serve as both human-readable documentation and executable test cases.
Note: When code blocks are evaluated, "redefined" warnings are automatically disabled.
Overview
A specification document consists of POD blocks that describe a package. The blocks are organized into the following categories:
Required Blocks - Must be present in every specification
Package Structure Blocks - Define inheritance and dependencies
API Blocks - Document attributes, methods, functions, etc.
Supporting Blocks - Signatures, examples, metadata, and exceptions
Feature Blocks - Special capabilities and operators
Document Control Blocks - Layout and partial inclusions
Project Information Blocks - Authors, license, version
Quick Reference
# [required]
=name
=abstract
=tagline
=synopsis
=description
# [optional]
=encoding
=includes
=libraries
=inherits
=integrates
# [optional; repeatable]
=attribute $name
=signature $name
=metadata $name
=example-$number $name
=raise $name $error ($id optional)
=function $name
=signature $name
=metadata $name
=example-$number $name
=raise $name $error ($id optional)
=message $name
=signature $name
=metadata $name
=example-$number $name
=method $name
=signature $name
=metadata $name
=example-$number $name
=raise $name $error ($id optional)
=routine $name
=signature $name
=metadata $name
=example-$number $name
=raise $name $error ($id optional)
=feature $name
=metadata $name
=example-$number $name
=error $name
=example-$number $name
=operator $name
=example-$number $name
# [optional]
=layout
=partials
=authors
=license
=project
=version
REQUIRED BLOCKS
These blocks must be present in every specification document.
name
=name
Example
=cut
$test->for('name');
The name block should contain the package name. This is tested for loadability.
abstract
=abstract
Example Test Documentation
=cut
$test->for('abstract');
The abstract block should contain a subtitle describing the package. This is tested for existence.
tagline
=tagline
Example Class
=cut
$test->for('tagline');
The tagline block should contain a 2-5 word description of the package, which will be prepended to the name as a full description of the package.
synopsis
=synopsis
use Example;
my $example = Example->new;
# bless(..., "Example")
=cut
$test->for('synopsis', sub {
my ($tryable) = @_;
$tryable->result;
});
The synopsis block should contain the normative usage of the package. This is tested for existence. This block should be written in a way that allows it to be evaled successfully and should return a value.
description
=description
This package provides an example class.
=cut
$test->for('description');
The description block should contain a description of the package and its behaviors.
PACKAGE BLOCKS
These optional blocks define the package's relationships and dependencies.
includes
=includes
function: eg
method: prepare
method: execute
=cut
$test->for('includes');
The includes block should contain a list of function, method, and/or routine names in the format of $type: $name. Empty (or commented out) lines are ignored. Each function, method, and/or routine is tested to be documented properly, i.e. has the requisite counterparts (e.g. signature and at least one example block). Also, the package must recognize that each exists.
libraries
=libraries
Venus::Check
=cut
$test->for('libraries');
The libraries block should contain a list of packages, each describing how particular type names used within function and method signatures will be validated. These packages are tested for loadability.
inherits
=inherits
Venus::Core::Class
=cut
$test->for('inherits');
The inherits block should contain a list of parent packages. These packages are tested for loadability.
integrates
=integrates
Venus::Role::Catchable
Venus::Role::Throwable
=cut
$test->for('integrates');
The integrates block should contain a list of packages that are involved in the behavior of the main package (typically roles). These packages are not automatically tested.
API BLOCKS
These blocks document the package's interface: attributes, methods, functions, messages, and routines. Each API block follows a common pattern requiring a description block, a signature block, and at least one example block.
Common Pattern
All API blocks (attribute, function, message, method, routine) follow this structure:
=$type $name # Description of the $type
=signature $name # Type signature
=metadata $name # Optional metadata (since, deprecated, etc.)
=example-1 $name # First example (required)
=example-2 $name # Additional examples (optional)
=raise $name $error # Document exceptions (optional)
=raise $name $error $id # Exception with named error (optional)
...
The signature block should contain a routine signature in the form of $signature : $return_type, where $signature is a valid typed signature and $return_type is any valid Venus::Check expression.
The example-$number block should contain valid Perl code and return a value. Examples can include a "magic" comment to incorporate other code:
# given: synopsis- Include the synopsis code# given: example-$number $name- Include another example's code
attribute
=attribute name
The name attribute is read-write, optional, and holds a string.
=signature name
name(string $value) (string)
=metadata name
since: 1.0.0
=example-1 name
# given: synopsis
my $name = $example->name;
# "..."
=cut
$test->for('attribute', 'name');
$test->for('example', 1, 'name', sub {
my ($tryable) = @_;
$tryable->result;
});
The attribute block should contain a description of the attribute and its purpose. Each attribute is tested and must be recognized to exist.
method
=method prepare
The prepare method prepares for execution.
=signature prepare
prepare() (boolean)
=example-1 prepare
# given: synopsis
my $prepare = $example->prepare;
# "..."
=cut
$test->for('method', 'prepare');
$test->for('example', 1, 'prepare', sub {
my ($tryable) = @_;
$tryable->result;
});
The method block should contain a description of the method and its purpose. Each method is tested and must be recognized to exist.
function
=function eg
The eg function returns a new instance of Example.
=signature eg
eg() (Example)
=example-1 eg
# given: synopsis
my $example = eg();
# "..."
=cut
$test->for('function', 'eg');
$test->for('example', 1, 'eg', sub {
my ($tryable) = @_;
$tryable->result;
});
The function block should contain a description of the function and its purpose. Each function is tested and must be recognized to exist.
routine
=routine process
The process routine processes and returns data.
=signature process
process(any @args) (any)
=example-1 process
# given: synopsis
my $result = $example->process;
# "..."
=cut
$test->for('routine', 'process');
$test->for('example', 1, 'process', sub {
my ($tryable) = @_;
$tryable->result;
});
The routine block documents a subroutine that can be called as either a function or a method. It follows the same pattern as method and function blocks.
message
=message accept
The accept message represents acceptance.
=signature accept
accept(any @args) (string)
=example-1 accept
# given: synopsis
my $accept = $example->accept;
# "..."
=cut
$test->for('message', 'accept');
$test->for('example', 1, 'accept', sub {
my ($tryable) = @_;
$tryable->result;
});
The message block documents a method that returns a message string, typically used for error messages or localization. It follows the same pattern as other API blocks.
SUPPORTING BLOCKS
These blocks provide additional context for API documentation.
signature
=signature prepare
prepare() (boolean)
=cut
$test->for('signature', 'prepare');
The signature block should contain a routine signature in the form of $signature : $return_type, where $signature is a valid typed signature and $return_type is any valid Venus::Check expression.
example
=example-1 name
# given: synopsis
my $name = $example->name;
# "..."
=cut
$test->for('example', 1, 'name', sub {
my ($tryable) = @_;
$tryable->result;
});
The example-$number $name block should contain valid Perl code and return a value. The block may contain a "magic" comment in the form of given: synopsis or given: example-$number $name which if present will include the given code example(s) with the evaluation of the current block.
metadata
=metadata prepare
{since => "1.2.3"}
=cut
$test->for('metadata', 'prepare');
The metadata $name block should contain a stringified hashref containing Perl data structures used in the rendering of the package's documentation. Metadata can also be specified as flat key/value pairs:
=metadata prepare
introduced: 1.2.3
deprecated: 2.0.0
=cut
raise
=raise execute Venus::Error
# given: synopsis
$example->operation; # throw exception
# Error
=cut
$test->for('raise', 'execute', 'Venus::Error', sub {
my ($tryable) = @_;
my $error = $tryable->error->result;
$test->is_error($error);
});
The raise $name $error block documents an exception that may be thrown by an API (attribute, function, method, or routine). The parameters are:
$name- The name of the attribute, function, method, or routine that may throw the exception.$error- The error class or package that may be caught (e.g.,Venus::Error,Example::Error).$id(optional) - An error name for further classification within the error class.
The $error represents the exception class that calling code can catch using a try/catch mechanism. This links the API documentation to error handling expectations.
An optional $id can be appended to specify a named error. Venus::Error objects support named errors for further classification:
=raise execute Venus::Error on.unknown
# given: synopsis
$example->operation; # throw exception
# Error (on.unknown)
=cut
$test->for('raise', 'execute', 'Venus::Error', 'on.unknown', sub {
my ($tryable) = @_;
my $error = $tryable->error->result;
$test->is_error($error);
$test->is($error->name, 'on.unknown');
});
When $id is provided, it indicates a specific named error within the error class, allowing for more granular error documentation and handling.
FEATURE BLOCKS
These blocks document special capabilities, errors, and operator overloads.
feature
=feature noop
This package provides no particularly useful features.
=example-1 noop
# given: synopsis
my $feature = $example->feature;
# "..."
=cut
$test->for('feature');
$test->for('example', 1, 'noop', sub {
my ($tryable) = @_;
$tryable->result;
});
The feature $name block should contain a description of the feature(s) the package enables, and can include an example-$number $name block to ensure the feature described works as expected.
error
=error error_on_unknown
This package may raise an error_on_unknown error.
=example-1 error_on_unknown
# given: synopsis
my $error = $example->catch('error', {
with => 'error_on_unknown',
});
# "..."
=cut
$test->for('error', 'error_on_unknown');
$test->for('example', 1, 'error_on_unknown', sub {
my ($tryable) = @_;
$tryable->result;
});
The error $name block should contain a description of the error the package may raise, and can include an example-$number $name block to ensure the error is raised and caught.
operator
=operator ("")
This package overloads the C<""> operator.
=example-1 ("")
# given: synopsis
my $string = "$example";
# "..."
=cut
$test->for('operator', '("")');
$test->for('example', 1, '("")', sub {
my ($tryable) = @_;
$tryable->result;
});
The operator $name block should contain a description of the overloaded operation the package performs, and can include an example-$number $name block to ensure the operation is functioning properly.
CONTROL BLOCKS
These blocks control how documentation is rendered.
encoding
=encoding
utf8
=cut
$test->for('encoding');
The encoding block should contain the appropriate encoding.
layout
=layout
encoding
name
synopsis
description
attributes: attribute
authors
license
=cut
$test->for('layout');
The layout block should contain a list of blocks to render using "render", in the order they should be rendered.
partials
=partials
t/path/to/other.t: present: authors
t/path/to/other.t: present: license
=cut
$test->for('partials');
The partials block should contain references to other marked-up test files in the form of $file: $method: $section, which will call the $method on a Venus::Test instance for the $file and include the results in-place as part of the rendering of the current file.
PROJECT BLOCKS
These blocks provide metadata about the project.
authors
=authors
Awncorp, C<awncorp@cpan.org>
=cut
$test->for('authors');
The authors block should contain text describing the authors of the package.
license
=license
No license granted.
=cut
$test->for('license');
The license block should contain a link and/or description of the license governing the package.
project
=project
https://github.com/awncorp/example
=cut
$test->for('project');
The project block should contain a description and/or links for the package's project.
version
=version
1.2.3
=cut
$test->for('version');
The version block should contain a valid version number for the package.
TESTING
This framework provides automated subtests based on the package specification, but also provides hooks for manual testing when automation is not sufficient.
Basic Testing
For simple blocks, testing verifies existence:
$test->for('name');
$test->for('abstract');
$test->for('description');
Testing with Callbacks
Code examples can be evaluated and returned using a callback for further testing:
$test->for('synopsis', sub {
my ($tryable) = @_;
my $result = $tryable->result;
# must return truthy to continue
$result;
});
Exception Testing
Because code examples are returned as Venus::Try objects, capturing and testing exceptions is straightforward:
$test->for('synopsis', sub {
my ($tryable) = @_;
# catch exception thrown by the synopsis
$tryable->catch('Path::Find::Error', sub {
return $_[0];
});
# test the exception
my $result = $tryable->result;
ok $result->isa('Path::Find::Error'), 'exception caught';
# must return truthy to continue
$result;
});
Testing Examples
The example method evaluates a given example and returns the result as a Venus::Try object. The first argument is the example number:
$test->for('example', 1, 'children', sub {
my ($tryable) = @_;
my $result = $tryable->result;
# must return truthy to continue
$result;
});
Testing Features
The feature method evaluates a documented feature and returns the result as a Venus::Try object:
$test->for('feature', 'export-path-make', sub {
my ($tryable) = @_;
ok my $result = $tryable->result, 'result ok';
# must return truthy to continue
$result;
});
Benefits
The test automation and documentation generation enabled through this framework makes it easy to maintain source/test/documentation parity. This also increases reusability and reduces the need for complicated state and test setup.
ATTRIBUTES
This package has the following attributes:
file
file(string $data) (string)
The file attribute is read-write, accepts (string) values, and is required.
Since 4.15
- file example 1
-
# given: synopsis package main; my $set_file = $test->file("t/Venus_Test.t"); # "t/Venus_Test.t"
- file example 2
-
# given: synopsis # given: example-1 file package main; my $get_file = $test->file; # "t/Venus_Test.t"
INHERITS
This package inherits behaviors from:
INTEGRATES
This package integrates behaviors from:
FUNCTIONS
This package provides the following functions:
test
test(string $file) (Venus::Test)
The test function is exported automatically and returns a Venus::Test object for the test file given.
Since 0.09
- test example 1
-
package main; use Venus::Test; my $test = test 't/Venus_Test.t'; # bless(..., "Venus::Test")
METHODS
This package provides the following methods:
auto
auto(string $name, any @args) (any)
The auto method gets or sets environment variables that control automatic behaviors in the testing framework. When called with just a name, it returns the current value of the corresponding environment variable. When called with a name and value, it sets the environment variable. The environment variable name is derived from the name parameter as VENUS_TEST_AUTO_${NAME}.
Supported auto settings:
bailout- When truthy, bails out of testing on the first error.render- When truthy, automatically renders POD when "done" is called.scrub- When truthy, uses "scrub" in Venus::Space to clean up packages created in example code for testing.unpatch- When truthy, uses "unpatch" in Venus::Space (via "unpatch") to restore any existing monkey-patching on the package associated with the test.
Since 4.15
- auto example 3
-
# given: synopsis package main; $test->auto('render', 1); my $auto = $test->auto('render'); # 1
- auto example 4
-
# given: synopsis package main; $test->auto('render', 0); my $auto = $test->auto('render'); # 0
- auto example 7
-
# given: synopsis package main; $test->auto('bailout', 1); my $auto = $test->auto('bailout'); # 1
- auto example 8
-
# given: synopsis package main; $test->auto('bailout', 0); my $auto = $test->auto('bailout'); # 0
- auto example 11
-
# given: synopsis package main; $test->auto('scrub', 1); my $auto = $test->auto('scrub'); # 1
- auto example 12
-
# given: synopsis package main; $test->auto('scrub', 0); my $auto = $test->auto('scrub'); # 0
- auto example 15
-
# given: synopsis package main; $test->auto('unpatch', 1); my $auto = $test->auto('unpatch'); # 1
- auto example 16
-
# given: synopsis package main; $test->auto('unpatch', 0); my $auto = $test->auto('unpatch'); # 0
diag
diag(string @messages) (any)
The diag method prints diagnostic messages using "diag" in Test::More.
Since 4.15
- diag example 1
-
# given: synopsis package main; my $diag = $test->diag('Test failed due to...'); # ()
done
done() (any)
The done method dispatches to the "done_testing" in Test::More operation and returns the result.
Since 4.15
eval
eval(string $perl) (any)
The eval method evaluates Perl code and returns the result.
Since 4.15
explain
explain(any @args) (any)
The explain method dispatches to the "explain" in Test::More operation and returns the result.
Since 4.15
- explain example 1
-
# given: synopsis package main; my $explain = $test->explain(123.456); # "123.456"
fail
fail(any $data, string $description) (any)
The fail method dispatches to the "ok" in Test::More operation expecting the first argument to be falsy and returns the result.
Since 4.15
- fail example 1
-
# given: synopsis package main; my $fail = $test->fail(0, 'example-1 fail passed'); # true
for
for(any @args) (Venus::Test)
The for method dispatches to the "execute" method using the arguments provided within a subtest and returns the invocant.
Since 4.15
- for example 1
-
# given: synopsis package main; my $for = $test->for('name'); # bless(..., "Venus::Test")
- for example 2
-
# given: synopsis package main; my $for = $test->for('synopsis'); # bless(..., "Venus::Test")
- for example 3
-
# given: synopsis package main; my $for = $test->for('synopsis', sub{ my ($tryable) = @_; return $tryable->result; }); # bless(..., "Venus::Test")
- for example 4
-
# given: synopsis package main; my $for = $test->for('example', 1, 'test', sub { my ($tryable) = @_; return $tryable->result; }); # bless(..., "Venus::Test")
gate
gate(string $note, coderef $code) (Venus::Test)
The gate method creates a new Venus::Test instance with a gate callback that prevents subtests from running unless the callback returns a truthy value.
Since 4.15
- gate example 1
-
# given: synopsis package main; my $test2 = $test->gate('OS is linux', sub { $^O eq 'linux' }); # bless(..., "Venus::Test")
handler
handler(any @args) (any)
The handler method dispatches to the Test::More method specified by the first argument and returns its result.
Since 4.15
in
in(arrayref | hashref | consumes[Venus::Role::Mappable] $collection, any $value) (boolean)
The in method checks if a value exists in a collection (arrayref, hashref, or "mappable" object) and returns true if the type and value match.
Since 4.15
is
is(any $data1, any $data2, string $description) (any)
The is method tests for equality using "is" in Test::More.
Since 4.15
- is example 1
-
# given: synopsis package main; my $is = $test->is('hello', 'hello', 'strings match'); # ()
is_arrayref
is_arrayref(any $data, string @args) (boolean)
The is_arrayref method tests whether the data is an arrayref using "is_arrayref" in Venus.
Since 4.15
- is_arrayref example 1
-
# given: synopsis package main; my $is_arrayref = $test->is_arrayref([1,2,3], 'valid arrayref'); # true
is_blessed
is_blessed(any $data, string @args) (boolean)
The is_blessed method tests whether the data is blessed using "is_blessed" in Venus.
Since 4.15
- is_blessed example 1
-
# given: synopsis package main; my $is_blessed = $test->is_blessed(bless({}), 'valid blessed'); # true
is_boolean
is_boolean(any $data, string @args) (boolean)
The is_boolean method tests whether the data is a boolean using "is_boolean" in Venus.
Since 4.15
- is_boolean example 1
-
# given: synopsis package main; require Venus; my $is_boolean = $test->is_boolean(true, 'valid boolean'); # true
is_coderef
is_coderef(any $data, string @args) (boolean)
The is_coderef method tests whether the data is a coderef using "is_coderef" in Venus.
Since 4.15
- is_coderef example 1
-
# given: synopsis package main; my $is_coderef = $test->is_coderef(sub{}, 'valid coderef'); # true
is_dirhandle
is_dirhandle(any $data, string @args) (boolean)
The is_dirhandle method tests whether the data is a directory handle using "is_dirhandle" in Venus.
Since 4.15
- is_dirhandle example 1
-
# given: synopsis package main; opendir(my $dh, '.'); my $is_dirhandle = $test->is_dirhandle($dh, 'valid dirhandle'); # true
is_enum
is_enum(any $data, arrayref | hashref $data, string @args) (boolean)
The is_enum method tests whether the data is an enum using "is_enum" in Venus.
Since 4.15
- is_enum example 1
-
# given: synopsis package main; $test->is_enum('light', ['light', 'dark'], 'is in enum'); # true
is_error
is_error(any $data, string @args) (boolean)
The is_error method tests whether the data is a Venus::Error object using "is_error" in Venus.
Since 4.15
- is_error example 1
-
# given: synopsis package main; use Venus::Error; my $is_error = $test->is_error(Venus::Error->new, 'valid error'); # true
is_false
is_false(any $data, string @args) (boolean)
The is_false method tests whether the data is a false value using "is_false" in Venus.
Since 4.15
- is_false example 1
-
# given: synopsis package main; my $is_false = $test->is_false(0, 'valid false'); # true
is_fault
is_fault(any $data, string @args) (boolean)
The is_fault method tests whether the data is a Venus::Fault object using "is_fault" in Venus.
Since 4.15
- is_fault example 1
-
# given: synopsis package main; use Venus::Fault; my $is_fault = $test->is_fault(Venus::Fault->new, 'valid fault'); # true
is_filehandle
is_filehandle(any $data, string @args) (boolean)
The is_filehandle method tests whether the data is a file handle using "is_filehandle" in Venus.
Since 4.15
- is_filehandle example 1
-
# given: synopsis package main; open(my $fh, '<', 't/Venus_Test.t'); my $is_filehandle = $test->is_filehandle($fh, 'valid filehandle'); # true
is_float
is_float(any $data, string @args) (boolean)
The is_float method tests whether the data is a float using "is_float" in Venus.
Since 4.15
- is_float example 1
-
# given: synopsis package main; my $is_float = $test->is_float(1.5, 'valid float'); # true
is_glob
is_glob(any $data, string @args) (boolean)
The is_glob method tests whether the data is a glob reference using "is_glob" in Venus.
Since 4.15
- is_glob example 1
-
# given: synopsis package main; my $is_glob = $test->is_glob(\*STDOUT, 'valid glob'); # true
is_hashref
is_hashref(any $data, string @args) (boolean)
The is_hashref method tests whether the data is a hashref using "is_hashref" in Venus.
Since 4.15
- is_hashref example 1
-
# given: synopsis package main; my $is_hashref = $test->is_hashref({a=>1}, 'valid hashref'); # true
is_number
is_number(any $data, string @args) (boolean)
The is_number method tests whether the data is a number using "is_number" in Venus.
Since 4.15
- is_number example 1
-
# given: synopsis package main; my $is_number = $test->is_number(123, 'valid number'); # true
is_object
is_object(any $data, string @args) (boolean)
The is_object method tests whether the data is an object using "is_object" in Venus.
Since 4.15
- is_object example 1
-
# given: synopsis package main; my $is_object = $test->is_object(bless({}), 'valid object'); # true
is_package
is_package(any $data, string @args) (boolean)
The is_package method tests whether the data is a package name using "is_package" in Venus.
Since 4.15
- is_package example 1
-
# given: synopsis package main; my $is_package = $test->is_package('Venus::Test', 'valid package'); # true
is_reference
is_reference(any $data, string @args) (boolean)
The is_reference method tests whether the data is a reference using "is_reference" in Venus.
Since 4.15
- is_reference example 1
-
# given: synopsis package main; my $is_reference = $test->is_reference([], 'valid reference'); # true
is_regexp
is_regexp(any $data, string @args) (boolean)
The is_regexp method tests whether the data is a regexp using "is_regexp" in Venus.
Since 4.15
- is_regexp example 1
-
# given: synopsis package main; my $is_regexp = $test->is_regexp(qr/test/, 'valid regexp'); # true
is_scalarref
is_scalarref(any $data, string @args) (boolean)
The is_scalarref method tests whether the data is a scalar reference using "is_scalarref" in Venus.
Since 4.15
- is_scalarref example 1
-
# given: synopsis package main; my $scalar = 'hello'; my $is_scalarref = $test->is_scalarref(\$scalar, 'valid scalarref'); # true
is_string
is_string(any $data, string @args) (boolean)
The is_string method tests whether the data is a string using "is_string" in Venus.
Since 4.15
- is_string example 1
-
# given: synopsis package main; my $is_string = $test->is_string('hello', 'valid string'); # true
is_true
is_true(any $data, string @args) (boolean)
The is_true method tests whether the data is a true value using "is_true" in Venus.
Since 4.15
- is_true example 1
-
# given: synopsis package main; my $is_true = $test->is_true(1, 'valid true'); # true
is_undef
is_undef(any $data, string @args) (boolean)
The is_undef method tests whether the data is undef using "is_undef" in Venus.
Since 4.15
- is_undef example 1
-
# given: synopsis package main; my $is_undef = $test->is_undef(undef, 'valid undef'); # true
is_value
is_value(any $data, string @args) (boolean)
The is_value method tests whether the data is a defined value using "is_value" in Venus.
Since 4.15
- is_value example 1
-
# given: synopsis package main; my $is_value = $test->is_value('hello', 'valid value'); # true
is_yesno
is_yesno(any $data, string @args) (boolean)
The is_yesno method tests whether the data is a yes/no value using "is_yesno" in Venus.
Since 4.15
- is_yesno example 1
-
# given: synopsis package main; my $is_yesno = $test->is_yesno(1, 'valid yesno'); # true
isnt
isnt(any $data1, any $data2, string $description) (any)
The isnt method tests for inequality using "isnt" in Test::More.
Since 4.15
- isnt example 1
-
# given: synopsis package main; my $isnt = $test->isnt('hello', 'world', 'strings differ'); # ()
isnt_arrayref
isnt_arrayref(any $data, string @args) (boolean)
The isnt_arrayref method tests whether the data is not an arrayref.
Since 4.15
- isnt_arrayref example 1
-
# given: synopsis package main; my $isnt_arrayref = $test->isnt_arrayref({}, 'not an arrayref'); # true
isnt_blessed
isnt_blessed(any $data, string @args) (boolean)
The isnt_blessed method tests whether the data is not a blessed object.
Since 4.15
- isnt_blessed example 1
-
# given: synopsis package main; my $isnt_blessed = $test->isnt_blessed('string', 'not blessed'); # true
isnt_boolean
isnt_boolean(any $data, string @args) (boolean)
The isnt_boolean method tests whether the data is not a boolean.
Since 4.15
- isnt_boolean example 1
-
# given: synopsis package main; my $isnt_boolean = $test->isnt_boolean('string', 'not boolean'); # true
isnt_coderef
isnt_coderef(any $data, string @args) (boolean)
The isnt_coderef method tests whether the data is not a coderef.
Since 4.15
- isnt_coderef example 1
-
# given: synopsis package main; my $isnt_coderef = $test->isnt_coderef('string', 'not coderef'); # true
isnt_dirhandle
isnt_dirhandle(any $data, string @args) (boolean)
The isnt_dirhandle method tests whether the data is not a directory handle.
Since 4.15
- isnt_dirhandle example 1
-
# given: synopsis package main; my $isnt_dirhandle = $test->isnt_dirhandle('string', 'not dirhandle'); # true
isnt_enum
isnt_enum(any $data, arrayref | hashref $data, string @args) (boolean)
The isnt_enum method tests whether the data is not an enum.
Since 4.15
- isnt_enum example 1
-
# given: synopsis package main; my $isnt_enum = $test->isnt_enum('light', [], 'not in enum'); # true
isnt_error
isnt_error(any $data, string @args) (boolean)
The isnt_error method tests whether the data is not a Venus::Error object.
Since 4.15
- isnt_error example 1
-
# given: synopsis package main; my $isnt_error = $test->isnt_error('string', 'not error'); # true
isnt_false
isnt_false(any $data, string @args) (boolean)
The isnt_false method tests whether the data is not a false value.
Since 4.15
- isnt_false example 1
-
# given: synopsis package main; my $isnt_false = $test->isnt_false(1, 'not false'); # true
isnt_fault
isnt_fault(any $data, string @args) (boolean)
The isnt_fault method tests whether the data is not a Venus::Fault object.
Since 4.15
- isnt_fault example 1
-
# given: synopsis package main; my $isnt_fault = $test->isnt_fault('string', 'not fault'); # true
isnt_filehandle
isnt_filehandle(any $data, string @args) (boolean)
The isnt_filehandle method tests whether the data is not a file handle.
Since 4.15
- isnt_filehandle example 1
-
# given: synopsis package main; my $isnt_filehandle = $test->isnt_filehandle('string', 'not filehandle'); # true
isnt_float
isnt_float(any $data, string @args) (boolean)
The isnt_float method tests whether the data is not a float.
Since 4.15
- isnt_float example 1
-
# given: synopsis package main; my $isnt_float = $test->isnt_float(123, 'not float'); # true
isnt_glob
isnt_glob(any $data, string @args) (boolean)
The isnt_glob method tests whether the data is not a glob reference.
Since 4.15
- isnt_glob example 1
-
# given: synopsis package main; my $isnt_glob = $test->isnt_glob('string', 'not glob'); # true
isnt_hashref
isnt_hashref(any $data, string @args) (boolean)
The isnt_hashref method tests whether the data is not a hashref.
Since 4.15
- isnt_hashref example 1
-
# given: synopsis package main; my $isnt_hashref = $test->isnt_hashref([], 'not a hashref'); # true
isnt_number
isnt_number(any $data, string @args) (boolean)
The isnt_number method tests whether the data is not a number.
Since 4.15
- isnt_number example 1
-
# given: synopsis package main; my $isnt_number = $test->isnt_number('string', 'not number'); # true
isnt_object
isnt_object(any $data, string @args) (boolean)
The isnt_object method tests whether the data is not an object.
Since 4.15
- isnt_object example 1
-
# given: synopsis package main; my $isnt_object = $test->isnt_object('string', 'not object'); # true
isnt_package
isnt_package(any $data, string @args) (boolean)
The isnt_package method tests whether the data is not a package name.
Since 4.15
- isnt_package example 1
-
# given: synopsis package main; my $isnt_package = $test->isnt_package([], 'not package'); # true
isnt_reference
isnt_reference(any $data, string @args) (boolean)
The isnt_reference method tests whether the data is not a reference.
Since 4.15
- isnt_reference example 1
-
# given: synopsis package main; my $isnt_reference = $test->isnt_reference('string', 'not reference'); # true
isnt_regexp
isnt_regexp(any $data, string @args) (boolean)
The isnt_regexp method tests whether the data is not a regexp.
Since 4.15
- isnt_regexp example 1
-
# given: synopsis package main; my $isnt_regexp = $test->isnt_regexp('string', 'not regexp'); # true
isnt_scalarref
isnt_scalarref(any $data, string @args) (boolean)
The isnt_scalarref method tests whether the data is not a scalar reference.
Since 4.15
- isnt_scalarref example 1
-
# given: synopsis package main; my $isnt_scalarref = $test->isnt_scalarref('string', 'not scalarref'); # true
isnt_string
isnt_string(any $data, string @args) (boolean)
The isnt_string method tests whether the data is not a string.
Since 4.15
- isnt_string example 1
-
# given: synopsis package main; my $isnt_string = $test->isnt_string([], 'not string'); # true
isnt_true
isnt_true(any $data, string @args) (boolean)
The isnt_true method tests whether the data is not a true value.
Since 4.15
- isnt_true example 1
-
# given: synopsis package main; my $isnt_true = $test->isnt_true(0, 'not true'); # true
isnt_undef
isnt_undef(any $data, string @args) (boolean)
The isnt_undef method tests whether the data is not undef.
Since 4.15
- isnt_undef example 1
-
# given: synopsis package main; my $isnt_undef = $test->isnt_undef('string', 'not undef'); # true
isnt_value
isnt_value(any $data, string @args) (boolean)
The isnt_value method tests whether the data is not a defined value.
Since 4.15
- isnt_value example 1
-
# given: synopsis package main; my $isnt_value = $test->isnt_value(undef, 'not value'); # true
isnt_yesno
isnt_yesno(any $data, string @args) (boolean)
The isnt_yesno method tests whether the data is not a yes/no value.
Since 4.15
- isnt_yesno example 1
-
# given: synopsis package main; my $isnt_yesno = $test->isnt_yesno('string', 'not yesno'); # true
lfile
lfile() (Venus::Path)
The lfile method returns the path to a lib file for the package being tested.
Since 4.15
like
like(string $data, string | Venus::Regexp $match, string $description) (any)
The like method dispatches to the "like" in Test::More operation and returns the result.
Since 4.15
- like example 1
-
# given: synopsis package main; my $like = $test->like('hello world', 'world', 'example-1 like passed'); # true
- like example 2
-
# given: synopsis package main; my $like = $test->like('hello world', qr/world/, 'example-1 like passed'); # true
mktemp_dir
mktemp_dir() (Venus::Path)
The mktemp_dir method creates and returns a temporary directory as a Venus::Path object.
Since 4.15
- mktemp_dir example 1
-
# given: synopsis package main; my $mktemp_dir = $test->mktemp_dir; # bless(..., "Venus::Path")
mktemp_file
mktemp_file() (Venus::Path)
The mktemp_file method creates and returns a temporary file as a Venus::Path object.
Since 4.15
- mktemp_file example 1
-
# given: synopsis package main; my $mktemp_file = $test->mktemp_file; # bless(..., "Venus::Path")
new
new(any @args) (Venus::Test)
The new method constructs an instance of the package.
Since 4.15
- new example 1
-
package main; use Venus::Test; my $new = Venus::Test->new; # bless(..., "Venus::Test")
- new example 2
-
package main; use Venus::Test; my $new = Venus::Test->new('t/Venus_Test.t'); # bless(..., "Venus::Test")
- new example 3
-
package main; use Venus::Test; my $new = Venus::Test->new(file => 't/Venus_Test.t'); # bless(..., "Venus::Test")
- may raise Venus::Test::Error
on.new -
package main; use Venus::Test; my $test = Venus::Test->new('t/data/no-name.t'); # Error! (on.new)
note
note(string @messages) (any)
The note method prints debugging messages using "diag" in Test::More and "explain" in Test::More.
Since 4.15
only_if
only_if(string | coderef $code) (Venus::Test)
The only_if method creates a gate that only runs subtests if the callback returns a truthy value.
Since 4.15
- only_if example 1
-
# given: synopsis package main; my $gate = $test->only_if('os_is_mac'); # bless(..., "Venus::Test")
os
os() (Venus::Os)
The os method returns a Venus::Os object.
Since 4.15
os_is_bsd
os_is_bsd() (boolean)
The os_is_bsd method returns true if the operating system is BSD.
Since 4.15
os_is_cyg
os_is_cyg() (boolean)
The os_is_cyg method returns true if the operating system is Cygwin.
Since 4.15
os_is_dos
os_is_dos() (boolean)
The os_is_dos method returns true if the operating system is DOS.
Since 4.15
os_is_lin
os_is_lin() (boolean)
The os_is_lin method returns true if the operating system is Linux.
Since 4.15
os_is_mac
os_is_mac() (boolean)
The os_is_mac method returns true if the operating system is macOS.
Since 4.15
os_is_non
os_is_non() (boolean)
The os_is_non method returns true if the operating system is non-Unix.
Since 4.15
os_is_sun
os_is_sun() (boolean)
The os_is_sun method returns true if the operating system is Solaris.
Since 4.15
os_is_vms
os_is_vms() (boolean)
The os_is_vms method returns true if the operating system is VMS.
Since 4.15
os_is_win
os_is_win() (boolean)
The os_is_win method returns true if the operating system is Windows.
Since 4.15
os_isnt_bsd
os_isnt_bsd() (boolean)
The os_isnt_bsd method returns true if the operating system is not BSD.
Since 4.15
os_isnt_cyg
os_isnt_cyg() (boolean)
The os_isnt_cyg method returns true if the operating system is not Cygwin.
Since 4.15
os_isnt_dos
os_isnt_dos() (boolean)
The os_isnt_dos method returns true if the operating system is not DOS.
Since 4.15
os_isnt_lin
os_isnt_lin() (boolean)
The os_isnt_lin method returns true if the operating system is not Linux.
Since 4.15
os_isnt_mac
os_isnt_mac() (boolean)
The os_isnt_mac method returns true if the operating system is not macOS.
Since 4.15
os_isnt_non
os_isnt_non() (boolean)
The os_isnt_non method returns true if the operating system is not non-Unix.
Since 4.15
os_isnt_sun
os_isnt_sun() (boolean)
The os_isnt_sun method returns true if the operating system is not Solaris.
Since 4.15
os_isnt_vms
os_isnt_vms() (boolean)
The os_isnt_vms method returns true if the operating system is not VMS.
Since 4.15
os_isnt_win
os_isnt_win() (boolean)
The os_isnt_win method returns true if the operating system is not Windows.
Since 4.15
pass
pass(any $data, string $description) (any)
The pass method dispatches to the "ok" in Test::More operation expecting the first argument to be truthy and returns the result.
Since 4.15
- pass example 1
-
# given: synopsis package main; my $fail = $test->pass(1, 'example-1 pass passed'); # true
patch
patch(string $name, coderef $code) (coderef)
The patch method monkey-patches the named subroutine and returns the original coderef.
Since 4.15
- patch example 1
-
# given: synopsis package main; my $orig = $test->patch('pass', sub { return 'patched'; }); # sub {...} $test->unpatch; # bless(..., "Venus::Space") $orig # sub {...}
path
path(string $path) (Venus::Path)
The path method returns a Venus::Path object for the given path. Defaults to the test file.
Since 4.15
- path example 1
-
# given: synopsis package main; my $path = $test->path('t/Venus_Test.t'); # bless(..., "Venus::Path")
pfile
pfile() (Venus::Path)
The pfile method returns the path to a pod file for the package being tested.
Since 4.15
render
render(string $file) (Venus::Path)
The render method reads the test specification and generates perlpod documentation and returns a Venus::Path object for the filename provided.
Since 4.15
- render example 1
-
# given: synopsis package main; my $path = $test->render('t/path/pod/test'); # bless(..., "Venus::Path")
same
same(any $data1, any $data2, string $description) (any)
The same method dispatches to the "is_deeply" in Test::More operation and returns the result.
Since 4.15
- same example 1
-
# given: synopsis package main; my $same = $test->same({1..4}, {1..4}, 'example-1 same passed'); # true
skip
skip(string $reason) (any)
The skip method dispatches to the "skip" in Test::More operation with the plan_all option and returns the result.
Since 4.15
skip_if
skip_if(string | coderef $code) (Venus::Test)
The skip_if method creates a gate that only runs subtests if the callback returns a falsy value.
Since 4.15
- skip_if example 1
-
# given: synopsis package main; my $gate = $test->skip_if('os_is_mac'); # bless(..., "Venus::Test")
space
space(string $package) (Venus::Space)
The space method returns a Venus::Space object for the package being tested, or for the package name provided.
Since 4.15
- space example 1
-
# given: synopsis package main; my $space = $test->space; # bless(..., "Venus::Space")
- space example 2
-
# given: synopsis package main; my $space = $test->space('Venus::Path'); # bless(..., "Venus::Space")
subtest
subtest(string $name, coderef $code) (any)
The subtest method runs a subtest using "subtest" in Test::More. Enclosed tests maybe be made conditional using a "gate", e.g., "only_if" and "skip_if".
Since 4.15
- subtest example 1
-
# given: synopsis package main; my $subtest = $test->subtest('test something', sub { $test->pass('it works'); }); # ()
text
text() (Venus::Text::Pod)
The text method returns a Venus::Text::Pod object using "file" for parsing the test specification.
Since 4.15
- text example 1
-
# given: synopsis package main; my $text = $test->text; # bless(..., "Venus::Text::Pod")
tfile
tfile() (Venus::Path)
The tfile method returns the path to a test file for the package being tested.
Since 4.15
type
type(any $data, string $expression, string @args) (boolean)
The type method performs type assertion using Venus::Type and tests if the data matches the type expression.
Since 4.15
- type example 1
-
# given: synopsis package main; my $type = $test->type([1,2,3], 'arrayref', 'valid arrayref'); # true
unlike
unlike(string $data, regexp $regex, string $description) (any)
The unlike method tests that a string doesn't match a regex using "unlike" in Test::More.
Since 4.15
- unlike example 1
-
# given: synopsis package main; my $unlike = $test->unlike('hello', qr/world/, 'does not match'); # ()
unpatch
unpatch(string @names) (Venus::Space)
The unpatch method undoes patches by name, or undoes all patches if no names are provided.
Since 4.15
- unpatch example 1
-
# given: synopsis package main; $test->patch('pass', sub {'patched'}); # sub {...} my $unpatch = $test->unpatch('pass'); # bless(..., "Venus::Space")
FEATURES
This package provides the following features:
- collect
-
collect(string $name, any @args) (any)The collect method dispatches to the
collect_data_for_${name}method indictated by the first argument and returns the result. Returns an arrayref in scalar context, and a list in list context.Introduced
3.55, Deprecated4.15example 1
# given: synopsis package main; my ($collect) = $test->collect('name'); # "Venus::Test"example 2
# given: synopsis package main; my $collect = $test->collect('name'); # ["Venus::Test"]
- collect_data_for_abstract
-
collect_data_for_abstract() (arrayref)The collect_data_for_abstract method uses "data" to fetch data for the
abstractsection and returns the data. Returns an arrayref in scalar context, and a list in list context.Introduced
3.55, Deprecated4.15example 1
# =abstract # # Example Test Documentation # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $collect_data_for_abstract = $test->collect_data_for_abstract; # ["Example Test Documentation"]example 2
# =abstract # # Example Test Documentation # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my ($collect_data_for_abstract) = $test->collect_data_for_abstract; # "Example Test Documentation"
- collect_data_for_attribute
-
collect_data_for_attribute(string $name) (arrayref)The collect_data_for_attribute method uses "data" to fetch data for the
attribute $namesection and returns the data. Returns an arrayref in scalar context, and a list in list context.Introduced
3.55, Deprecated4.15example 1
# =attribute name # # The name attribute is read-write, optional, and holds a string. # # =cut # # =example-1 name # # # given: synopsis # # my $name = $example->name; # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $collect_data_for_attribute = $test->collect_data_for_attribute('name'); # ["The name attribute is read-write, optional, and holds a string."]example 2
# =attribute name # # The name attribute is read-write, optional, and holds a string. # # =cut # # =example-1 name # # # given: synopsis # # my $name = $example->name; # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my ($collect_data_for_attribute) = $test->collect_data_for_attribute('name'); # "The name attribute is read-write, optional, and holds a string."
-
collect_data_for_authors() (arrayref)The collect_data_for_authors method uses "data" to fetch data for the
authorssection and returns the data. Returns an arrayref in scalar context, and a list in list context.Introduced
3.55, Deprecated4.15example 1
# =authors # # Awncorp, C<awncorp@cpan.org> # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $collect_data_for_authors = $test->collect_data_for_authors; # ["Awncorp, C<awncorp@cpan.org>"]example 2
# =authors # # Awncorp, C<awncorp@cpan.org> # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my ($collect_data_for_authors) = $test->collect_data_for_authors; # "Awncorp, C<awncorp@cpan.org>"
- collect_data_for_description
-
collect_data_for_description() (arrayref)The collect_data_for_description method uses "data" to fetch data for the
descriptionsection and returns the data. Returns an arrayref in scalar context, and a list in list context.Introduced
3.55, Deprecated4.15example 1
# =description # # This package provides an example class. # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $collect_data_for_description = $test->collect_data_for_description; # ["This package provides an example class."]example 2
# =description # # This package provides an example class. # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my ($collect_data_for_description) = $test->collect_data_for_description; # "This package provides an example class."
- collect_data_for_encoding
-
collect_data_for_encoding() (arrayref)The collect_data_for_encoding method uses "data" to fetch data for the
encodingsection and returns the data. Returns an arrayref in scalar context, and a list in list context.Introduced
3.55, Deprecated4.15example 1
# =encoding # # utf8 # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $collect_data_for_encoding = $test->collect_data_for_encoding; # ["UTF8"]example 2
# =encoding # # utf8 # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my ($collect_data_for_encoding) = $test->collect_data_for_encoding; # "UTF8"
- collect_data_for_error
-
collect_data_for_error(string $name) (arrayref)The collect_data_for_error method uses "data" to fetch data for the
error $namesection and returns the data. Returns an arrayref in scalar context, and a list in list context.Introduced
3.55, Deprecated4.15example 1
# =error error_on_unknown # # This package may raise an error_on_unknown error. # # =cut # # =example-1 error_on_unknown # # # given: synopsis # # my $error = $example->catch('error', { # with => 'error_on_unknown', # }); # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $collect_data_for_error = $test->collect_data_for_error('error_on_unknown'); # ["This package may raise an error_on_unknown error."]example 2
# =error error_on_unknown # # This package may raise an error_on_unknown error. # # =cut # # =example-1 error_on_unknown # # # given: synopsis # # my $error = $example->catch('error', { # with => 'error_on_unknown', # }); # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my ($collect_data_for_error) = $test->collect_data_for_error('error_on_unknown'); # "This package may raise an error_on_unknown error."
- collect_data_for_example
-
collect_data_for_example(number $numberm string $name) (arrayref)The collect_data_for_example method uses "data" to fetch data for the
example-$number $namesection and returns the data. Returns an arrayref in scalar context, and a list in list context.Introduced
3.55, Deprecated4.15example 1
# =attribute name # # The name attribute is read-write, optional, and holds a string. # # =cut # # =example-1 name # # # given: synopsis # # my $name = $example->name; # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $collect_data_for_example = $test->collect_data_for_example(1, 'name'); # [' # given: synopsis', ' my $name = $example->name;', ' # "..."']example 2
# =attribute name # # The name attribute is read-write, optional, and holds a string. # # =cut # # =example-1 name # # # given: synopsis # # my $name = $example->name; # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my @collect_data_for_example = $test->collect_data_for_example(1, 'name'); # (' # given: synopsis', ' my $name = $example->name;', ' # "..."')
- collect_data_for_feature
-
collect_data_for_feature(string $name) (arrayref)The collect_data_for_feature method uses "data" to fetch data for the
feature $namesection and returns the data. Returns an arrayref in scalar context, and a list in list context.Introduced
3.55, Deprecated4.15example 1
# =feature noop # # This package is no particularly useful features. # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $collect_data_for_feature = $test->collect_data_for_feature('noop'); # ["This package is no particularly useful features."]example 2
# =feature noop # # This package is no particularly useful features. # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my ($collect_data_for_feature) = $test->collect_data_for_feature('noop'); # "This package is no particularly useful features."
- collect_data_for_function
-
collect_data_for_function(string $name) (arrayref)The collect_data_for_function method uses "data" to fetch data for the
function $namesection and returns the data. Returns an arrayref in scalar context, and a list in list context.Introduced
3.55, Deprecated4.15example 1
# =function eg # # The eg function returns a new instance of Example. # # =cut # # =example-1 name # # # given: synopsis # # my $example = eg(); # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $collect_data_for_function = $test->collect_data_for_function('eg'); # ["The eg function returns a new instance of Example."]example 2
# =function eg # # The eg function returns a new instance of Example. # # =cut # # =example-1 name # # # given: synopsis # # my $example = eg(); # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my ($collect_data_for_function) = $test->collect_data_for_function('eg'); # "The eg function returns a new instance of Example."
- collect_data_for_includes
-
collect_data_for_includes() (arrayref)The collect_data_for_includes method uses "data" to fetch data for the
includessection and returns the data. Returns an arrayref in scalar context, and a list in list context.Introduced
3.55, Deprecated4.15example 1
# =includes # # function: eg # # method: prepare # method: execute # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $collect_data_for_includes = $test->collect_data_for_includes; # ["function: eg", "method: prepare", "method: execute"]example 2
# =includes # # function: eg # # method: prepare # method: execute # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my @collect_data_for_includes = $test->collect_data_for_includes; # ("function: eg", "method: prepare", "method: execute")
- collect_data_for_inherits
-
collect_data_for_inherits() (arrayref)The collect_data_for_inherits method uses "data" to fetch data for the
inheritssection and returns the data. Returns an arrayref in scalar context, and a list in list context.Introduced
3.55, Deprecated4.15example 1
# =inherits # # Venus::Core::Class # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $collect_data_for_inherits = $test->collect_data_for_inherits; # ["Venus::Core::Class"]example 2
# =inherits # # Venus::Core::Class # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my ($collect_data_for_inherits) = $test->collect_data_for_inherits; # "Venus::Core::Class"
- collect_data_for_integrates
-
collect_data_for_integrates() (arrayref)The collect_data_for_integrates method uses "data" to fetch data for the
integratessection and returns the data. Returns an arrayref in scalar context, and a list in list context.Introduced
3.55, Deprecated4.15example 1
# =integrates # # Venus::Role::Catchable # Venus::Role::Throwable # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $collect_data_for_integrates = $test->collect_data_for_integrates; # ["Venus::Role::Catchable\nVenus::Role::Throwable"]example 2
# =integrates # # Venus::Role::Catchable # Venus::Role::Throwable # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my ($collect_data_for_integrates) = $test->collect_data_for_integrates; # "Venus::Role::Catchable\nVenus::Role::Throwable"
- collect_data_for_layout
-
collect_data_for_layout() (arrayref)The collect_data_for_layout method uses "data" to fetch data for the
layoutsection and returns the data. Returns an arrayref in scalar context, and a list in list context.Introduced
3.55, Deprecated4.15example 1
# =layout # # encoding # name # synopsis # description # attributes: attribute # authors # license # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $collect_data_for_layout = $test->collect_data_for_layout; # ["encoding\nname\nsynopsis\ndescription\nattributes: attribute\nauthors\nlicense"]example 2
# =layout # # encoding # name # synopsis # description # attributes: attribute # authors # license # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my ($collect_data_for_layout) = $test->collect_data_for_layout; # "encoding\nname\nsynopsis\ndescription\nattributes: attribute\nauthors\nlicense"
- collect_data_for_libraries
-
collect_data_for_libraries() (arrayref)The collect_data_for_libraries method uses "data" to fetch data for the
librariessection and returns the data. Returns an arrayref in scalar context, and a list in list context.Introduced
3.55, Deprecated4.15example 1
# =libraries # # Venus::Check # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $collect_data_for_libraries = $test->collect_data_for_libraries; # ["Venus::Check"]example 2
# =libraries # # Venus::Check # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my ($collect_data_for_libraries) = $test->collect_data_for_libraries; # "Venus::Check"
- collect_data_for_license
-
collect_data_for_license() (arrayref)The collect_data_for_license method uses "data" to fetch data for the
licensesection and returns the data. Returns an arrayref in scalar context, and a list in list context.Introduced
3.55, Deprecated4.15example 1
# =license # # No license granted. # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $collect_data_for_license = $test->collect_data_for_license; # ["No license granted."]example 2
# =license # # No license granted. # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my ($collect_data_for_license) = $test->collect_data_for_license; # "No license granted."
- collect_data_for_message
-
collect_data_for_message(string $name) (arrayref)The collect_data_for_message method uses "data" to fetch data for the
message $namesection and returns the data. Returns an arrayref in scalar context, and a list in list context.Introduced
3.55, Deprecated4.15example 1
# =message accept # # The accept message represents acceptance. # # =cut # # =example-1 accept # # # given: synopsis # # my $accept = $example->accept; # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $collect_data_for_message = $test->collect_data_for_message('accept'); # ["The accept message represents acceptance."]example 2
# =message accept # # The accept message represents acceptance. # # =cut # # =example-1 accept # # # given: synopsis # # my $accept = $example->accept; # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my ($collect_data_for_message) = $test->collect_data_for_message('accept'); # "The accept message represents acceptance."
- collect_data_for_metadata
-
collect_data_for_metadata(string $name) (arrayref)The collect_data_for_metadata method uses "data" to fetch data for the
metadata $namesection and returns the data. Returns an arrayref in scalar context, and a list in list context.Introduced
3.55, Deprecated4.15example 1
# =method prepare # # The prepare method prepares for execution. # # =cut # # =metadata prepare # # {since => 1.2.3} # # =cut # # =example-1 prepare # # # given: synopsis # # my $prepare = $example->prepare; # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $collect_data_for_metadata = $test->collect_data_for_metadata('prepare'); # ["{since => 1.2.3}"]example 2
# =method prepare # # The prepare method prepares for execution. # # =cut # # =metadata prepare # # {since => 1.2.3} # # =cut # # =example-1 prepare # # # given: synopsis # # my $prepare = $example->prepare; # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my ($collect_data_for_metadata) = $test->collect_data_for_metadata('prepare'); # "{since => 1.2.3}"
- collect_data_for_method
-
collect_data_for_method(string $name) (arrayref)The collect_data_for_method method uses "data" to fetch data for the
method $namesection and returns the data. Returns an arrayref in scalar context, and a list in list context.Introduced
3.55, Deprecated4.15example 1
# =method execute # # The execute method executes the logic. # # =cut # # =metadata execute # # {since => 1.2.3} # # =cut # # =example-1 execute # # # given: synopsis # # my $execute = $example->execute; # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $collect_data_for_method = $test->collect_data_for_method('execute'); # ["The execute method executes the logic."]example 2
# =method execute # # The execute method executes the logic. # # =cut # # =metadata execute # # {since => 1.2.3} # # =cut # # =example-1 execute # # # given: synopsis # # my $execute = $example->execute; # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my ($collect_data_for_method) = $test->collect_data_for_method('execute'); # "The execute method executes the logic."
- collect_data_for_name
-
collect_data_for_name() (arrayref)The collect_data_for_name method uses "data" to fetch data for the
namesection and returns the data. Returns an arrayref in scalar context, and a list in list context.Introduced
3.55, Deprecated4.15example 1
# =name # Example # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $collect_data_for_name = $test->collect_data_for_name; # ["Example"]example 2
# =name # Example # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my ($collect_data_for_name) = $test->collect_data_for_name; # "Example"
- collect_data_for_operator
-
collect_data_for_operator(string $name) (arrayref)The collect_data_for_operator method uses "data" to fetch data for the
operator $namesection and returns the data. Returns an arrayref in scalar context, and a list in list context.Introduced
3.55, Deprecated4.15example 1
# =operator ("") # # This package overloads the C<""> operator. # # =cut # # =example-1 ("") # # # given: synopsis # # my $string = "$example"; # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $collect_data_for_operator = $test->collect_data_for_operator('("")'); # ['This package overloads the C<""> operator.']example 2
# =operator ("") # # This package overloads the C<""> operator. # # =cut # # =example-1 ("") # # # given: synopsis # # my $string = "$example"; # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my ($collect_data_for_operator) = $test->collect_data_for_operator('("")'); # 'This package overloads the C<""> operator.'
- collect_data_for_partials
-
collect_data_for_partials() (arrayref)The collect_data_for_partials method uses "data" to fetch data for the
partialssection and returns the data. Returns an arrayref in scalar context, and a list in list context.Introduced
3.55, Deprecated4.15example 1
# =partials # # t/path/to/other.t: present: authors # t/path/to/other.t: present: license # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $collect_data_for_partials = $test->collect_data_for_partials; # ["t/path/to/other.t: present: authors\nt/path/to/other.t: present: license"]example 2
# =partials # # t/path/to/other.t: present: authors # t/path/to/other.t: present: license # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my ($collect_data_for_partials) = $test->collect_data_for_partials; # "t/path/to/other.t: present: authors\nt/path/to/other.t: present: license"
- collect_data_for_project
-
collect_data_for_project() (arrayref)The collect_data_for_project method uses "data" to fetch data for the
projectsection and returns the data. Returns an arrayref in scalar context, and a list in list context.Introduced
3.55, Deprecated4.15example 1
# =project # # https://github.com/awncorp/example # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $collect_data_for_project = $test->collect_data_for_project; # ["https://github.com/awncorp/example"]example 2
# =project # # https://github.com/awncorp/example # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my ($collect_data_for_project) = $test->collect_data_for_project; # "https://github.com/awncorp/example"
- collect_data_for_signature
-
collect_data_for_signature(string $name) (arrayref)The collect_data_for_signature method uses "data" to fetch data for the
signature $namesection and returns the data. Returns an arrayref in scalar context, and a list in list context.Introduced
3.55, Deprecated4.15example 1
# =method execute # # The execute method executes the logic. # # =cut # # =signature execute # # execute() (boolean) # # =cut # # =metadata execute # # {since => 1.2.3} # # =cut # # =example-1 execute # # # given: synopsis # # my $execute = $example->execute; # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $collect_data_for_signature = $test->collect_data_for_signature('execute'); # [" execute() (boolean)"]example 2
# =method execute # # The execute method executes the logic. # # =cut # # =signature execute # # execute() (boolean) # # =cut # # =metadata execute # # {since => 1.2.3} # # =cut # # =example-1 execute # # # given: synopsis # # my $execute = $example->execute; # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my ($collect_data_for_signature) = $test->collect_data_for_signature('execute'); # " execute() (boolean)"
- collect_data_for_synopsis
-
collect_data_for_synopsis() (arrayref)The collect_data_for_synopsis method uses "data" to fetch data for the
synopsissection and returns the data. Returns an arrayref in scalar context, and a list in list context.Introduced
3.55, Deprecated4.15example 1
# =synopsis # # use Example; # # my $example = Example->new; # # # bless(..., "Example") # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $collect_data_for_synopsis = $test->collect_data_for_synopsis; # [' use Example;', ' my $example = Example->new;', ' # bless(..., "Example")']example 2
# =synopsis # # use Example; # # my $example = Example->new; # # # bless(..., "Example") # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my @collect_data_for_synopsis = $test->collect_data_for_synopsis; # (' use Example;', ' my $example = Example->new;', ' # bless(..., "Example")')
- collect_data_for_tagline
-
collect_data_for_tagline() (arrayref)The collect_data_for_tagline method uses "data" to fetch data for the
taglinesection and returns the data. Returns an arrayref in scalar context, and a list in list context.Introduced
3.55, Deprecated4.15example 1
# =tagline # # Example Class # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $collect_data_for_tagline = $test->collect_data_for_tagline; # ["Example Class"]example 2
# =tagline # # Example Class # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my ($collect_data_for_tagline) = $test->collect_data_for_tagline; # "Example Class"
- collect_data_for_version
-
collect_data_for_version() (arrayref)The collect_data_for_version method uses "data" to fetch data for the
versionsection and returns the data. Returns an arrayref in scalar context, and a list in list context.Introduced
3.55, Deprecated4.15example 1
# =version # # 1.2.3 # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $collect_data_for_version = $test->collect_data_for_version; # ["1.2.3"]example 2
# =version # # 1.2.3 # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my ($collect_data_for_version) = $test->collect_data_for_version; # "1.2.3"
- data
-
data() (Venus::Text::Pod)The data method returns a Venus::Text::Pod object using "file" for parsing the test specification.
Introduced
3.55, Deprecated4.15example 1
# given: synopsis package main; my $data = $test->data; # bless(..., "Venus::Text::Pod")
- execute
-
execute(string $name, any @args) (boolean)The execute method dispatches to the
execute_data_for_${name}method indictated by the first argument and returns the result. Returns an arrayref in scalar context, and a list in list context.Introduced
3.55, Deprecated4.15example 1
# given: synopsis package main; my $execute = $test->execute('name'); # trueexample 2
# given: synopsis package main; my $execute = $test->execute('name', sub { my ($data) = @_; my $result = $data->[0] eq 'Venus::Test' ? true : false; $self->pass($result, 'name set as Venus::Test'); return $result; }); # true
- execute_test_for_abstract
-
execute_test_for_abstract() (arrayref)The execute_test_for_abstract method tests a documentation block for the
abstractsection and returns the result.Introduced
3.55, Deprecated4.15example 1
# =abstract # # Example Test Documentation # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $execute_test_for_abstract = $test->execute_test_for_abstract; # true
- execute_test_for_attribute
-
execute_test_for_attribute(string $name) (arrayref)The execute_test_for_attribute method tests a documentation block for the
attribute $namesection and returns the result.Introduced
3.55, Deprecated4.15example 1
# =attribute name # # The name attribute is read-write, optional, and holds a string. # # =cut # # =example-1 name # # # given: synopsis # # my $name = $example->name; # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $execute_test_for_attribute = $test->execute_test_for_attribute('name'); # true
-
execute_test_for_authors() (arrayref)The execute_test_for_authors method tests a documentation block for the
authorssection and returns the result.Introduced
3.55, Deprecated4.15example 1
# =authors # # Awncorp, C<awncorp@cpan.org> # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $execute_test_for_authors = $test->execute_test_for_authors; # true
- execute_test_for_description
-
execute_test_for_description() (arrayref)The execute_test_for_description method tests a documentation block for the
descriptionsection and returns the result.Introduced
3.55, Deprecated4.15example 1
# =description # # This package provides an example class. # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $execute_test_for_description = $test->execute_test_for_description; # true
- execute_test_for_encoding
-
execute_test_for_encoding() (arrayref)The execute_test_for_encoding method tests a documentation block for the
encodingsection and returns the result.Introduced
3.55, Deprecated4.15example 1
# =encoding # # utf8 # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $execute_test_for_encoding = $test->execute_test_for_encoding; # true
- execute_test_for_error
-
execute_test_for_error(string $name) (arrayref)The execute_test_for_error method tests a documentation block for the
error $namesection and returns the result.Introduced
3.55, Deprecated4.15example 1
# =error error_on_unknown # # This package may raise an error_on_unknown error. # # =cut # # =example-1 error_on_unknown # # # given: synopsis # # my $error = $example->catch('error', { # with => 'error_on_unknown', # }); # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $execute_test_for_error = $test->execute_test_for_error('error_on_unknown'); # true
- execute_test_for_example
-
execute_test_for_example(number $numberm string $name) (arrayref)The execute_test_for_example method tests a documentation block for the
example-$number $namesection and returns the result.Introduced
3.55, Deprecated4.15example 1
# =attribute name # # The name attribute is read-write, optional, and holds a string. # # =cut # # =example-1 name # # # given: synopsis # # my $name = $example->name; # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $execute_test_for_example = $test->execute_test_for_example(1, 'name'); # true
- execute_test_for_feature
-
execute_test_for_feature(string $name) (arrayref)The execute_test_for_feature method tests a documentation block for the
feature $namesection and returns the result.Introduced
3.55, Deprecated4.15example 1
# =feature noop # # This package is no particularly useful features. # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $execute_test_for_feature = $test->execute_test_for_feature('noop'); # true
- execute_test_for_function
-
execute_test_for_function(string $name) (arrayref)The execute_test_for_function method tests a documentation block for the
function $namesection and returns the result.Introduced
3.55, Deprecated4.15example 1
# =function eg # # The eg function returns a new instance of Example. # # =cut # # =example-1 name # # # given: synopsis # # my $example = eg(); # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $execute_test_for_function = $test->execute_test_for_function('eg'); # true
- execute_test_for_includes
-
execute_test_for_includes() (arrayref)The execute_test_for_includes method tests a documentation block for the
includessection and returns the result.Introduced
3.55, Deprecated4.15example 1
# =includes # # function: eg # # method: prepare # method: execute # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $execute_test_for_includes = $test->execute_test_for_includes; # true
- execute_test_for_inherits
-
execute_test_for_inherits() (arrayref)The execute_test_for_inherits method tests a documentation block for the
inheritssection and returns the result.Introduced
3.55, Deprecated4.15example 1
# =inherits # # Venus::Core::Class # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $execute_test_for_inherits = $test->execute_test_for_inherits; # true
- execute_test_for_integrates
-
execute_test_for_integrates() (arrayref)The execute_test_for_integrates method tests a documentation block for the
integratessection and returns the result.Introduced
3.55, Deprecated4.15example 1
# =integrates # # Venus::Role::Catchable # Venus::Role::Throwable # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $execute_test_for_integrates = $test->execute_test_for_integrates; # true
- execute_test_for_layout
-
execute_test_for_layout() (arrayref)The execute_test_for_layout method tests a documentation block for the
layoutsection and returns the result.Introduced
3.55, Deprecated4.15example 1
# =layout # # encoding # name # synopsis # description # attributes: attribute # authors # license # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $execute_test_for_layout = $test->execute_test_for_layout; # true
- execute_test_for_libraries
-
execute_test_for_libraries() (arrayref)The execute_test_for_libraries method tests a documentation block for the
librariessection and returns the result.Introduced
3.55, Deprecated4.15example 1
# =libraries # # Venus::Check # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $execute_test_for_libraries = $test->execute_test_for_libraries; # true
- execute_test_for_license
-
execute_test_for_license() (arrayref)The execute_test_for_license method tests a documentation block for the
licensesection and returns the result.Introduced
3.55, Deprecated4.15example 1
# =license # # No license granted. # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $execute_test_for_license = $test->execute_test_for_license; # true
- execute_test_for_message
-
execute_test_for_message(string $name) (arrayref)The execute_test_for_message method tests a documentation block for the
message $namesection and returns the result.Introduced
3.55, Deprecated4.15example 1
# =message accept # # The accept message represents acceptance. # # =cut # # =example-1 accept # # # given: synopsis # # my $accept = $example->accept; # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $execute_test_for_message = $test->execute_test_for_message('accept'); # true
- execute_test_for_metadata
-
execute_test_for_metadata(string $name) (arrayref)The execute_test_for_metadata method tests a documentation block for the
metadata $namesection and returns the result.Introduced
3.55, Deprecated4.15example 1
# =method prepare # # The prepare method prepares for execution. # # =cut # # =metadata prepare # # {since => 1.2.3} # # =cut # # =example-1 prepare # # # given: synopsis # # my $prepare = $example->prepare; # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $execute_test_for_metadata = $test->execute_test_for_metadata('prepare'); # true
- execute_test_for_method
-
execute_test_for_method(string $name) (arrayref)The execute_test_for_method method tests a documentation block for the
method $namesection and returns the result.Introduced
3.55, Deprecated4.15example 1
# =method execute # # The execute method executes the logic. # # =cut # # =metadata execute # # {since => 1.2.3} # # =cut # # =example-1 execute # # # given: synopsis # # my $execute = $example->execute; # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $execute_test_for_method = $test->execute_test_for_method('execute'); # true
- execute_test_for_name
-
execute_test_for_name() (arrayref)The execute_test_for_name method tests a documentation block for the
namesection and returns the result.Introduced
3.55, Deprecated4.15example 1
# =name # Example # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $execute_test_for_name = $test->execute_test_for_name; # true
- execute_test_for_operator
-
execute_test_for_operator(string $name) (arrayref)The execute_test_for_operator method tests a documentation block for the
operator $namesection and returns the result.Introduced
3.55, Deprecated4.15example 1
# =operator ("") # # This package overloads the C<""> operator. # # =cut # # =example-1 ("") # # # given: synopsis # # my $string = "$example"; # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $execute_test_for_operator = $test->execute_test_for_operator('("")'); # true
- execute_test_for_raise
-
execute_test_for_raise(string $name, string $class, string $id) (arrayref)The execute_test_for_raise method tests a documentation block for the
raise $name $error $idsection and returns the result.Introduced
4.15example 1
# =raise execute Venus::Error on.unknown # # # given: synopsis # # $example->operation; # throw exception # # # Error (on.unknown) # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $execute_test_for_raise = $test->execute_test_for_raise('execute', 'Venus::Error', 'on.unknown'); # true
- more
-
more(any @args) (any)The more method dispatches to the Test::More method specified by the first argument and returns its result.
Introduced
3.55, Deprecated4.15example 1
# given: synopsis package main; my $more = $test->more('ok', true); # true
- okay
-
okay(any $data, string $description) (any)The okay method dispatches to the "ok" in Test::More operation and returns the result.
Introduced
3.55, Deprecated4.15example 1
# given: synopsis package main; my $okay = $test->okay(1, 'example-1 okay passed'); # trueexample 2
# given: synopsis package main; my $okay = $test->okay(!0, 'example-1 okay passed'); # true
- okay_can
-
okay_can(string $name, string @args) (any)The okay_can method dispatches to the "can_ok" in Test::More operation and returns the result.
Introduced
3.55, Deprecated4.15example 1
# given: synopsis package main; my $okay_can = $test->okay_can('Venus::Test', 'diag'); # true
- okay_isa
-
okay_isa(string $name, string $base) (any)The okay_isa method dispatches to the "isa_ok" in Test::More operation and returns the result.
Introduced
3.55, Deprecated4.15example 1
# given: synopsis package main; my $okay_isa = $test->okay_isa('Venus::Test', 'Venus::Kind'); # true
- perform
-
perform(string $name, any @args) (boolean)The perform method dispatches to the
perform_data_for_${name}method indictated by the first argument and returns the result. Returns an arrayref in scalar context, and a list in list context.Introduced
3.55, Deprecated4.15example 1
# given: synopsis package main; my $data = $test->collect('name'); my $perform = $test->perform('name', $data); # true
- perform_test_for_abstract
-
perform_test_for_abstract(arrayref $data) (boolean)The perform_data_for_abstract method performs an overridable test for the
abstractsection and returns truthy or falsy.Introduced
3.55, Deprecated4.15example 1
package Example::Test; use Venus::Class 'base'; base 'Venus::Test'; sub perform_test_for_abstract { my ($self, $data) = @_; my $result = length(join "\n", @{$data}) ? true : false; $self->pass($result, "=abstract content"); return $result; } package main; my $test = Example::Test->new('t/path/pod/example'); my $data = $test->collect_data_for_abstract; my $perform_test_for_abstract = $test->perform_test_for_abstract( $data, ); # true
- perform_test_for_attribute
-
perform_test_for_attribute(string $name, arrayref $data) (boolean)The perform_data_for_attribute method performs an overridable test for the
attribute $namesection and returns truthy or falsy.Introduced
3.55, Deprecated4.15example 1
package Example::Test; use Venus::Class 'base'; base 'Venus::Test'; sub perform_test_for_attribute { my ($self, $name, $data) = @_; my $result = length(join "\n", @{$data}) ? true : false; $self->pass($result, "=attribute $name content"); return $result; } package main; my $test = Example::Test->new('t/path/pod/example'); my $data = $test->collect_data_for_attribute('name'); my $perform_test_for_attribute = $test->perform_test_for_attribute( 'name', $data, ); # true
-
perform_test_for_authors(arrayref $data) (boolean)The perform_data_for_authors method performs an overridable test for the
authorssection and returns truthy or falsy.Introduced
3.55, Deprecated4.15example 1
package Example::Test; use Venus::Class 'base'; base 'Venus::Test'; sub perform_test_for_authors { my ($self, $data) = @_; my $result = length(join "\n", @{$data}) ? true : false; $self->pass($result, "=authors content"); return $result; } package main; my $test = Example::Test->new('t/path/pod/example'); my $data = $test->collect_data_for_authors; my $perform_test_for_authors = $test->perform_test_for_authors( $data, ); # true
- perform_test_for_description
-
perform_test_for_description(arrayref $data) (boolean)The perform_data_for_description method performs an overridable test for the
descriptionsection and returns truthy or falsy.Introduced
3.55, Deprecated4.15example 1
package Example::Test; use Venus::Class 'base'; base 'Venus::Test'; sub perform_test_for_description { my ($self, $data) = @_; my $result = length(join "\n", @{$data}) ? true : false; $self->pass($result, "=description content"); return $result; } package main; my $test = Example::Test->new('t/path/pod/example'); my $data = $test->collect_data_for_description; my $perform_test_for_description = $test->perform_test_for_description( $data, ); # true
- perform_test_for_encoding
-
perform_test_for_encoding(arrayref $data) (boolean)The perform_data_for_encoding method performs an overridable test for the
encodingsection and returns truthy or falsy.Introduced
3.55, Deprecated4.15example 1
package Example::Test; use Venus::Class 'base'; base 'Venus::Test'; sub perform_test_for_encoding { my ($self, $data) = @_; my $result = length(join "\n", @{$data}) ? true : false; $self->pass($result, "=encoding content"); return $result; } package main; my $test = Example::Test->new('t/path/pod/example'); my $data = $test->collect_data_for_encoding; my $perform_test_for_encoding = $test->perform_test_for_encoding( $data, ); # true
- perform_test_for_error
-
perform_test_for_error(arrayref $data) (boolean)The perform_data_for_error method performs an overridable test for the
error $namesection and returns truthy or falsy.Introduced
3.55, Deprecated4.15example 1
package Example::Test; use Venus::Class 'base'; base 'Venus::Test'; sub perform_test_for_error { my ($self, $name, $data) = @_; my $result = length(join "\n", @{$data}) ? true : false; $self->pass($result, "=error $name content"); return $result; } package main; my $test = Example::Test->new('t/path/pod/example'); my $data = $test->collect_data_for_error('error_on_unknown'); my $perform_test_for_error = $test->perform_test_for_error( 'error_on_unknown', $data, ); # true
- perform_test_for_example
-
perform_test_for_example(arrayref $data) (boolean)The perform_data_for_example method performs an overridable test for the
example-$number $namesection and returns truthy or falsy.Introduced
3.55, Deprecated4.15example 1
package Example::Test; use Venus::Class 'base'; base 'Venus::Test'; sub perform_test_for_example { my ($self, $number, $name, $data) = @_; my $result = length(join "\n", @{$data}) ? true : false; $self->pass($result, "=example-$number $name content"); return $result; } package main; my $test = Example::Test->new('t/path/pod/example'); my $data = $test->collect_data_for_example(1, 'execute'); my $perform_test_for_example = $test->perform_test_for_example( 1, 'execute', $data, ); # true
- perform_test_for_feature
-
perform_test_for_feature(arrayref $data) (boolean)The perform_data_for_feature method performs an overridable test for the
feature $namesection and returns truthy or falsy.Introduced
3.55, Deprecated4.15example 1
package Example::Test; use Venus::Class 'base'; base 'Venus::Test'; sub perform_test_for_feature { my ($self, $name, $data) = @_; my $result = length(join "\n", @{$data}) ? true : false; $self->pass($result, "=feature $name content"); return $result; } package main; my $test = Example::Test->new('t/path/pod/example'); my $data = $test->collect_data_for_feature('noop'); my $perform_test_for_feature = $test->perform_test_for_feature( 'noop', $data, ); # true
- perform_test_for_function
-
perform_test_for_function(arrayref $data) (boolean)The perform_data_for_function method performs an overridable test for the
function $namesection and returns truthy or falsy.Introduced
3.55, Deprecated4.15example 1
package Example::Test; use Venus::Class 'base'; base 'Venus::Test'; sub perform_test_for_function { my ($self, $name, $data) = @_; my $result = length(join "\n", @{$data}) ? true : false; $self->pass($result, "=function $name content"); return $result; } package main; my $test = Example::Test->new('t/path/pod/example'); my $data = $test->collect_data_for_function('eg'); my $perform_test_for_function = $test->perform_test_for_function( 'eg', $data, ); # true
- perform_test_for_includes
-
perform_test_for_includes(arrayref $data) (boolean)The perform_data_for_includes method performs an overridable test for the
includessection and returns truthy or falsy.Introduced
3.55, Deprecated4.15example 1
package Example::Test; use Venus::Class 'base'; base 'Venus::Test'; sub perform_test_for_includes { my ($self, $data) = @_; my $result = length(join "\n", @{$data}) ? true : false; $self->pass($result, "=includes content"); return $result; } package main; my $test = Example::Test->new('t/path/pod/example'); my $data = $test->collect_data_for_includes; my $perform_test_for_includes = $test->perform_test_for_includes( $data, ); # true
- perform_test_for_inherits
-
perform_test_for_inherits(arrayref $data) (boolean)The perform_data_for_inherits method performs an overridable test for the
inheritssection and returns truthy or falsy.Introduced
3.55, Deprecated4.15example 1
package Example::Test; use Venus::Class 'base'; base 'Venus::Test'; sub perform_test_for_inherits { my ($self, $data) = @_; my $result = length(join "\n", @{$data}) ? true : false; $self->pass($result, "=inherits content"); return $result; } package main; my $test = Example::Test->new('t/path/pod/example'); my $data = $test->collect_data_for_inherits; my $perform_test_for_inherits = $test->perform_test_for_inherits( $data, ); # true
- perform_test_for_integrates
-
perform_test_for_integrates(arrayref $data) (boolean)The perform_data_for_integrates method performs an overridable test for the
integratessection and returns truthy or falsy.Introduced
3.55, Deprecated4.15example 1
package Example::Test; use Venus::Class 'base'; base 'Venus::Test'; sub perform_test_for_integrates { my ($self, $data) = @_; my $result = length(join "\n", @{$data}) ? true : false; $self->pass($result, "=integrates content"); return $result; } package main; my $test = Example::Test->new('t/path/pod/example'); my $data = $test->collect_data_for_integrates; my $perform_test_for_integrates = $test->perform_test_for_integrates( $data, ); # true
- perform_test_for_layout
-
perform_test_for_layout(arrayref $data) (boolean)The perform_data_for_layout method performs an overridable test for the
layoutsection and returns truthy or falsy.Introduced
3.55, Deprecated4.15example 1
package Example::Test; use Venus::Class 'base'; base 'Venus::Test'; sub perform_test_for_layout { my ($self, $data) = @_; my $result = length(join "\n", @{$data}) ? true : false; $self->pass($result, "=layout content"); return $result; } package main; my $test = Example::Test->new('t/path/pod/example'); my $data = $test->collect_data_for_layout; my $perform_test_for_layout = $test->perform_test_for_layout( $data, ); # true
- perform_test_for_libraries
-
perform_test_for_libraries(arrayref $data) (boolean)The perform_data_for_libraries method performs an overridable test for the
librariessection and returns truthy or falsy.Introduced
3.55, Deprecated4.15example 1
package Example::Test; use Venus::Class 'base'; base 'Venus::Test'; sub perform_test_for_libraries { my ($self, $data) = @_; my $result = length(join "\n", @{$data}) ? true : false; $self->pass($result, "=libraries content"); return $result; } package main; my $test = Example::Test->new('t/path/pod/example'); my $data = $test->collect_data_for_libraries; my $perform_test_for_libraries = $test->perform_test_for_libraries( $data, ); # true
- perform_test_for_license
-
perform_test_for_license(arrayref $data) (boolean)The perform_data_for_license method performs an overridable test for the
licensesection and returns truthy or falsy.Introduced
3.55, Deprecated4.15example 1
package Example::Test; use Venus::Class 'base'; base 'Venus::Test'; sub perform_test_for_license { my ($self, $data) = @_; my $result = length(join "\n", @{$data}) ? true : false; $self->pass($result, "=license content"); return $result; } package main; my $test = Example::Test->new('t/path/pod/example'); my $data = $test->collect_data_for_license; my $perform_test_for_license = $test->perform_test_for_license( $data, ); # true
- perform_test_for_message
-
perform_test_for_message(arrayref $data) (boolean)The perform_data_for_message method performs an overridable test for the
message $namesection and returns truthy or falsy.Introduced
3.55, Deprecated4.15example 1
package Example::Test; use Venus::Class 'base'; base 'Venus::Test'; sub perform_test_for_message { my ($self, $name, $data) = @_; my $result = length(join "\n", @{$data}) ? true : false; $self->pass($result, "=message $name content"); return $result; } package main; my $test = Example::Test->new('t/path/pod/example'); my $data = $test->collect_data_for_message('accept'); my $perform_test_for_message = $test->perform_test_for_message( 'accept', $data, ); # true
- perform_test_for_metadata
-
perform_test_for_metadata(arrayref $data) (boolean)The perform_data_for_metadata method performs an overridable test for the
metadata $namesection and returns truthy or falsy.Introduced
3.55, Deprecated4.15example 1
package Example::Test; use Venus::Class 'base'; base 'Venus::Test'; sub perform_test_for_metadata { my ($self, $name, $data) = @_; my $result = length(join "\n", @{$data}) ? true : false; $self->pass($result, "=metadata $name content"); return $result; } package main; my $test = Example::Test->new('t/path/pod/example'); my $data = $test->collect_data_for_metadata('execute'); my $perform_test_for_metadata = $test->perform_test_for_metadata( 'execute', $data, ); # true
- perform_test_for_method
-
perform_test_for_method(arrayref $data) (boolean)The perform_data_for_method method performs an overridable test for the
method $namesection and returns truthy or falsy.Introduced
3.55, Deprecated4.15example 1
package Example::Test; use Venus::Class 'base'; base 'Venus::Test'; sub perform_test_for_method { my ($self, $name, $data) = @_; my $result = length(join "\n", @{$data}) ? true : false; $self->pass($result, "=method $name content"); return $result; } package main; my $test = Example::Test->new('t/path/pod/example'); my $data = $test->collect_data_for_method('execute'); my $perform_test_for_method = $test->perform_test_for_method( 'execute', $data, ); # true
- perform_test_for_name
-
perform_test_for_name(arrayref $data) (boolean)The perform_data_for_name method performs an overridable test for the
namesection and returns truthy or falsy.Introduced
3.55, Deprecated4.15example 1
package Example::Test; use Venus::Class 'base'; base 'Venus::Test'; sub perform_test_for_name { my ($self, $data) = @_; my $result = length(join "\n", @{$data}) ? true : false; $self->pass($result, "=name content"); return $result; } package main; my $test = Example::Test->new('t/path/pod/example'); my $data = $test->collect_data_for_name; my $perform_test_for_name = $test->perform_test_for_name( $data, ); # true
- perform_test_for_operator
-
perform_test_for_operator(arrayref $data) (boolean)The perform_data_for_operator method performs an overridable test for the
operator $namesection and returns truthy or falsy.Introduced
3.55, Deprecated4.15example 1
package Example::Test; use Venus::Class 'base'; base 'Venus::Test'; sub perform_test_for_operator { my ($self, $name, $data) = @_; my $result = length(join "\n", @{$data}) ? true : false; $self->pass($result, "=operator $name content"); return $result; } package main; my $test = Example::Test->new('t/path/pod/example'); my $data = $test->collect_data_for_operator('("")'); my $perform_test_for_operator = $test->perform_test_for_operator( '("")', $data, ); # true
- perform_test_for_partials
-
perform_test_for_partials(arrayref $data) (boolean)The perform_data_for_partials method performs an overridable test for the
partialssection and returns truthy or falsy.Introduced
3.55, Deprecated4.15example 1
package Example::Test; use Venus::Class 'base'; base 'Venus::Test'; sub perform_test_for_partials { my ($self, $data) = @_; my $result = length(join "\n", @{$data}) ? true : false; $self->pass($result, "=partials content"); return $result; } package main; my $test = Example::Test->new('t/path/pod/example'); my $data = $test->collect_data_for_partials; my $perform_test_for_partials = $test->perform_test_for_partials( $data, ); # true
- perform_test_for_project
-
perform_test_for_project(arrayref $data) (boolean)The perform_data_for_project method performs an overridable test for the
projectsection and returns truthy or falsy.Introduced
3.55, Deprecated4.15example 1
package Example::Test; use Venus::Class 'base'; base 'Venus::Test'; sub perform_test_for_project { my ($self, $data) = @_; my $result = length(join "\n", @{$data}) ? true : false; $self->pass($result, "=project content"); return $result; } package main; my $test = Example::Test->new('t/path/pod/example'); my $data = $test->collect_data_for_project; my $perform_test_for_project = $test->perform_test_for_project( $data, ); # true
- perform_test_for_signature
-
perform_test_for_signature(arrayref $data) (boolean)The perform_data_for_signature method performs an overridable test for the
signature $namesection and returns truthy or falsy.Introduced
3.55, Deprecated4.15example 1
package Example::Test; use Venus::Class 'base'; base 'Venus::Test'; sub perform_test_for_signature { my ($self, $name, $data) = @_; my $result = length(join "\n", @{$data}) ? true : false; $self->pass($result, "=signature $name content"); return $result; } package main; my $test = Example::Test->new('t/path/pod/example'); my $data = $test->collect_data_for_signature('execute'); my $perform_test_for_signature = $test->perform_test_for_signature( 'execute', $data, ); # true
- perform_test_for_synopsis
-
perform_test_for_synopsis(arrayref $data) (boolean)The perform_data_for_synopsis method performs an overridable test for the
synopsissection and returns truthy or falsy.Introduced
3.55, Deprecated4.15example 1
package Example::Test; use Venus::Class 'base'; base 'Venus::Test'; sub perform_test_for_synopsis { my ($self, $data) = @_; my $result = length(join "\n", @{$data}) ? true : false; $self->pass($result, "=synopsis content"); return $result; } package main; my $test = Example::Test->new('t/path/pod/example'); my $data = $test->collect_data_for_synopsis; my $perform_test_for_synopsis = $test->perform_test_for_synopsis( $data, ); # true
- perform_test_for_tagline
-
perform_test_for_tagline(arrayref $data) (boolean)The perform_data_for_tagline method performs an overridable test for the
taglinesection and returns truthy or falsy.Introduced
3.55, Deprecated4.15example 1
package Example::Test; use Venus::Class 'base'; base 'Venus::Test'; sub perform_test_for_tagline { my ($self, $data) = @_; my $result = length(join "\n", @{$data}) ? true : false; $self->pass($result, "=tagline content"); return $result; } package main; my $test = Example::Test->new('t/path/pod/example'); my $data = $test->collect_data_for_tagline; my $perform_test_for_tagline = $test->perform_test_for_tagline( $data, ); # true
- perform_test_for_version
-
perform_test_for_version(arrayref $data) (boolean)The perform_data_for_version method performs an overridable test for the
versionsection and returns truthy or falsy.Introduced
3.55, Deprecated4.15example 1
package Example::Test; use Venus::Class 'base'; base 'Venus::Test'; sub perform_test_for_version { my ($self, $data) = @_; my $result = length(join "\n", @{$data}) ? true : false; $self->pass($result, "=version content"); return $result; } package main; my $test = Example::Test->new('t/path/pod/example'); my $data = $test->collect_data_for_version; my $perform_test_for_version = $test->perform_test_for_version( $data, ); # true
- present
-
present(string $name, any @args) (string)The present method dispatches to the
present_data_for_${name}method indictated by the first argument and returns the result. Returns an arrayref in scalar context, and a list in list context.Introduced
3.55, Deprecated4.15example 1
# given: synopsis package main; my $present = $test->present('name'); # =head1 NAME # # Venus::Test - Test Class # # =cut
- present_data_for_abstract
-
present_data_for_abstract() (arrayref)The present_data_for_abstract method builds a documentation block for the
abstractsection and returns it as a string.Introduced
3.55, Deprecated4.15example 1
# =abstract # # Example Test Documentation # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $present_data_for_abstract = $test->present_data_for_abstract; # =head1 ABSTRACT # # Example Test Documentation # # =cut
- present_data_for_attribute
-
present_data_for_attribute(string $name) (arrayref)The present_data_for_attribute method builds a documentation block for the
attribute $namesection and returns it as a string.Introduced
3.55, Deprecated4.15example 1
# =attribute name # # The name attribute is read-write, optional, and holds a string. # # =cut # # =example-1 name # # # given: synopsis # # my $name = $example->name; # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $present_data_for_attribute = $test->present_data_for_attribute('name'); # =head2 name # # The name attribute is read-write, optional, and holds a string. # # =over 4 # # =item name example 1 # # # given: synopsis # # my $name = $example->name; # # # "..." # # =back # # =cut
-
present_data_for_authors() (arrayref)The present_data_for_authors method builds a documentation block for the
authorssection and returns it as a string.Introduced
3.55, Deprecated4.15example 1
# =authors # # Awncorp, C<awncorp@cpan.org> # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $present_data_for_authors = $test->present_data_for_authors; # =head1 AUTHORS # # Awncorp, C<awncorp@cpan.org> # # =cut
- present_data_for_description
-
present_data_for_description() (arrayref)The present_data_for_description method builds a documentation block for the
descriptionsection and returns it as a string.Introduced
3.55, Deprecated4.15example 1
# =description # # This package provides an example class. # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $present_data_for_description = $test->present_data_for_description; # =head1 DESCRIPTION # # This package provides an example class. # # =cut
- present_data_for_encoding
-
present_data_for_encoding() (arrayref)The present_data_for_encoding method builds a documentation block for the
encodingsection and returns it as a string.Introduced
3.55, Deprecated4.15example 1
# =encoding # # utf8 # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $present_data_for_encoding = $test->present_data_for_encoding; # =encoding UTF8 # # =cut
- present_data_for_error
-
present_data_for_error(string $name) (arrayref)The present_data_for_error method builds a documentation block for the
error $namesection and returns it as a string.Introduced
3.55, Deprecated4.15example 1
# =error error_on_unknown # # This package may raise an error_on_unknown error. # # =cut # # =example-1 error_on_unknown # # # given: synopsis # # my $error = $example->catch('error', { # with => 'error_on_unknown', # }); # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $present_data_for_error = $test->present_data_for_error('error_on_unknown'); # =over 4 # # =item error: C<error_on_unknown> # # This package may raise an error_on_unknown error. # # B<example 1> # # # given: synopsis # # my $error = $example->catch('error', { # with => 'error_on_unknown', # }); # # # "..." # # =back
- present_data_for_example
-
present_data_for_example(number $numberm string $name) (arrayref)The present_data_for_example method builds a documentation block for the
example-$number $namesection and returns it as a string.Introduced
3.55, Deprecated4.15example 1
# =attribute name # # The name attribute is read-write, optional, and holds a string. # # =cut # # =example-1 name # # # given: synopsis # # my $name = $example->name; # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $present_data_for_example = $test->present_data_for_example(1, 'name'); # =over 4 # # =item name example 1 # # # given: synopsis # # my $name = $example->name; # # # "..." # # =back
- present_data_for_feature
-
present_data_for_feature(string $name) (arrayref)The present_data_for_feature method builds a documentation block for the
feature $namesection and returns it as a string.Introduced
3.55, Deprecated4.15example 1
# =feature noop # # This package is no particularly useful features. # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $present_data_for_feature = $test->present_data_for_feature('noop'); # =over 4 # # =item noop # # This package is no particularly useful features. # # =back
- present_data_for_function
-
present_data_for_function(string $name) (arrayref)The present_data_for_function method builds a documentation block for the
function $namesection and returns it as a string.Introduced
3.55, Deprecated4.15example 1
# =function eg # # The eg function returns a new instance of Example. # # =cut # # =example-1 name # # # given: synopsis # # my $example = eg(); # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $present_data_for_function = $test->present_data_for_function('eg'); # =head2 eg # # The eg function returns a new instance of Example. # # =cut
- present_data_for_includes
-
present_data_for_includes() (arrayref)The present_data_for_includes method builds a documentation block for the
includessection and returns it as a string.Introduced
3.55, Deprecated4.15example 1
# =includes # # function: eg # # method: prepare # method: execute # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $present_data_for_includes = $test->present_data_for_includes; # undef
- present_data_for_inherits
-
present_data_for_inherits() (arrayref)The present_data_for_inherits method builds a documentation block for the
inheritssection and returns it as a string.Introduced
3.55, Deprecated4.15example 1
# =inherits # # Venus::Core::Class # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $present_data_for_inherits = $test->present_data_for_inherits; # =head1 INHERITS # # This package inherits behaviors from: # # L<Venus::Core::Class> # # =cut
- present_data_for_integrates
-
present_data_for_integrates() (arrayref)The present_data_for_integrates method builds a documentation block for the
integratessection and returns it as a string.Introduced
3.55, Deprecated4.15example 1
# =integrates # # Venus::Role::Catchable # Venus::Role::Throwable # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $present_data_for_integrates = $test->present_data_for_integrates; # =head1 INTEGRATES # # This package integrates behaviors from: # # L<Venus::Role::Catchable> # # L<Venus::Role::Throwable> # # =cut
- present_data_for_layout
-
present_data_for_layout() (arrayref)The present_data_for_layout method builds a documentation block for the
layoutsection and returns it as a string.Introduced
3.55, Deprecated4.15example 1
# =layout # # encoding # name # synopsis # description # attributes: attribute # authors # license # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $present_data_for_layout = $test->present_data_for_layout; # undef
- present_data_for_libraries
-
present_data_for_libraries() (arrayref)The present_data_for_libraries method builds a documentation block for the
librariessection and returns it as a string.Introduced
3.55, Deprecated4.15example 1
# =libraries # # Venus::Check # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $present_data_for_libraries = $test->present_data_for_libraries; # =head1 LIBRARIES # # This package uses type constraints from: # # L<Venus::Check> # # =cut
- present_data_for_license
-
present_data_for_license() (arrayref)The present_data_for_license method builds a documentation block for the
licensesection and returns it as a string.Introduced
3.55, Deprecated4.15example 1
# =license # # No license granted. # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $present_data_for_license = $test->present_data_for_license; # =head1 LICENSE # # No license granted. # # =cut
- present_data_for_message
-
present_data_for_message(string $name) (arrayref)The present_data_for_message method builds a documentation block for the
message $namesection and returns it as a string.Introduced
3.55, Deprecated4.15example 1
# =message accept # # The accept message represents acceptance. # # =cut # # =example-1 accept # # # given: synopsis # # my $accept = $example->accept; # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $present_data_for_message = $test->present_data_for_message('accept'); # =over 4 # # =item accept # # The accept message represents acceptance. # # B<example 1> # # # given: synopsis # # my $accept = $example->accept; # # # "..." # # =back
- present_data_for_metadata
-
present_data_for_metadata(string $name) (arrayref)The present_data_for_metadata method builds a documentation block for the
metadata $namesection and returns it as a string.Introduced
3.55, Deprecated4.15example 1
# =method prepare # # The prepare method prepares for execution. # # =cut # # =metadata prepare # # {since => 1.2.3} # # =cut # # =example-1 prepare # # # given: synopsis # # my $prepare = $example->prepare; # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $present_data_for_metadata = $test->present_data_for_metadata('prepare'); # undef
- present_data_for_method
-
present_data_for_method(string $name) (arrayref)The present_data_for_method method builds a documentation block for the
method $namesection and returns it as a string.Introduced
3.55, Deprecated4.15example 1
# =method execute # # The execute method executes the logic. # # =cut # # =metadata execute # # {since => 1.2.3} # # =cut # # =example-1 execute # # # given: synopsis # # my $execute = $example->execute; # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $present_data_for_method = $test->present_data_for_method('execute'); # =head2 execute # # execute() (boolean) # # The execute method executes the logic. # # I<Since C<1.2.3>> # # =over 4 # # =item execute example 1 # # # given: synopsis # # my $execute = $example->execute; # # # "..." # # =back # # =cut
- present_data_for_name
-
present_data_for_name() (arrayref)The present_data_for_name method builds a documentation block for the
namesection and returns it as a string.Introduced
3.55, Deprecated4.15example 1
# =name # Example # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $present_data_for_name = $test->present_data_for_name; # =head1 NAME # # Example - Example Class # # =cut
- present_data_for_operator
-
present_data_for_operator(string $name) (arrayref)The present_data_for_operator method builds a documentation block for the
operator $namesection and returns it as a string.Introduced
3.55, Deprecated4.15example 1
# =operator ("") # # This package overloads the C<""> operator. # # =cut # # =example-1 ("") # # # given: synopsis # # my $string = "$example"; # # # "..." # # =cut package main; use Venus::Test 'test'; my $test = test 't/path/pod/example'; my $present_data_for_operator = $test->present_data_for_operator('("")'); # =over 4 # # =item operation: C<("")> # # This package overloads the C<""> operator. # # B<example 1> # # # given: synopsis # # my $string = "$example"; # # # "..." # # =back
AUTHORS
Awncorp, awncorp@cpan.org
LICENSE
Copyright (C) 2022, Awncorp, awncorp@cpan.org.
This program is free software, you can redistribute it and/or modify it under the terms of the Apache license version 2.0.