Venus::Role::Unpackable

Unpackable Role

Unpackable Role for Perl 5

method: unpack

package Example;

use Venus::Class;

with 'Venus::Role::Unpackable';

sub execute {
  return shift;
}

package main;

my $example = Example->new;

# $example->unpack("hello", 123, 1.23)->signature(
#   'string', 'number', 'float',
# );

This package modifies the consuming package and provides methods for unpacking and validating argument lists.

The unpack method passes the arguments provided to Venus::Unpack for unpacking and validating arbitrary argument lists.

unpack(any @args) (Venus::Unpack)

{ since => '2.01', }

=example-1 unpack

package main;

my $example = Example->new;

my $results = $example->unpack("hello", 123, 1.23)->signature(
  'any',
);

# ["hello", 123, 1.23]

t/Venus.t: present: authors t/Venus.t: present: license

12 POD Errors

The following errors were encountered while parsing the POD:

Around line 14:

Unknown directive: =name

Around line 22:

Unknown directive: =tagline

Around line 30:

Unknown directive: =abstract

Around line 38:

Unknown directive: =includes

Around line 46:

Unknown directive: =synopsis

Around line 77:

Unknown directive: =description

Around line 86:

Unknown directive: =method

Around line 91:

Unknown directive: =signature

Around line 95:

Unknown directive: =metadata

Around line 136:

=cut found outside a pod block. Skipping to next block.

Around line 160:

=cut found outside a pod block. Skipping to next block.

Around line 170:

Unknown directive: =partials