NAME

PNI::Slot - is a basic unit of data

SYNOPSIS

my $slot = PNI::Slot->new;

$slot->data('foo');

ATTRIBUTES

data

node

my $node = $slot->node;

Abstract attribute used by PNI::In and PNI::Out to hold a reference to its PNI::Node.

METHODS

is_array

$slot->data([qw(foo bar)]);
$slot->is_array; # true

is_code

$slot->data(sub { say 'hello'; });
$slot->is_code; # true

is_defined

is_hash

$slot->data({ foo => 'bar' });
$slot->is_hash; # true

is_number

$slot->data(0);
$slot->is_number; # true

is_scalar

is_string

is_undef

type

Returns a string representing the slot data type, i.e. UNDEF, SCALAR or the return value of ref function.