The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

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"

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.