The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Venus::Role::Explainable - Explainable Role

ABSTRACT

Explainable Role for Perl 5

SYNOPSIS

  package Example;

  use Venus::Class;

  attr 'test';

  sub explain {
    "okay"
  }

  with 'Venus::Role::Explainable';

  package main;

  my $example = Example->new(test => 123);

  # $example->explain;

DESCRIPTION

This package modifies the consuming package and provides methods for making the object stringifiable.

METHODS

This package provides the following methods:

explain

  explain() (Any)

The explain method takes no arguments and returns the value to be used in stringification operations.

Since 0.01

explain example 1
  package main;

  my $example = Example->new(test => 123);

  my $explain = $example->explain;

  # "okay"