|
NAMEVenus::Role::Printable - Printable Role ABSTRACTPrintable Role for Perl 5 SYNOPSIS package Example;
use Venus::Class;
with 'Venus::Role::Dumpable';
with 'Venus::Role::Printable';
attr 'test';
sub execute {
return [@_];
}
sub printer {
return [@_];
}
package main;
my $example = Example->new(test => 123);
# $example->say;
DESCRIPTIONThis package provides a mechanism for outputting (printing) objects or the return value of a dispatched method call to STDOUT. METHODSThis package provides the following methods: print(any @data) (any) The print method prints a stringified representation of the underlying data. Since 0.01
print_jsonprint_json(string | coderef $method, any @args) (any) The print_json method prints a JSON representation of the underlying data. This method supports dispatching, i.e. providing a method name and arguments whose return value will be acted on by this method. Since 2.91
print_prettyprint_pretty(any @data) (any) The print_pretty method prints a stringified human-readable representation of the underlying data. Since 0.01
print_stringprint_string(string | coderef $method, any @args) (any) The print_string method prints a string representation of the underlying data without using a dump. This method supports dispatching, i.e. providing a method name and arguments whose return value will be acted on by this method. Since 0.09
print_yamlprint_yaml(string | coderef $method, any @args) (any) The print_yaml method prints a YAML representation of the underlying data. This method supports dispatching, i.e. providing a method name and arguments whose return value will be acted on by this method. Since 2.91
saysay(any @data) (any) The say method prints a stringified representation of the underlying data, with a trailing newline. Since 0.01
say_jsonsay_json(string | coderef $method, any @args) (any) The say_json method prints a JSON representation of the underlying data. This method supports dispatching, i.e. providing a method name and arguments whose return value will be acted on by this method, with a trailing newline. Since 2.91
say_prettysay_pretty(any @data) (any) The say_pretty method prints a stringified human-readable representation of the underlying data, with a trailing newline. Since 0.01
say_stringsay_string(string | coderef $method, any @args) (any) The say_string method prints a string representation of the underlying data without using a dump, with a trailing newline. This method supports dispatching, i.e. providing a method name and arguments whose return value will be acted on by this method. Since 0.09
say_yamlsay_yaml(string | coderef $method, any @args) (any) The say_yaml method prints a YAML representation of the underlying data. This method supports dispatching, i.e. providing a method name and arguments whose return value will be acted on by this method, with a trailing newline. Since 2.91
AUTHORSAwncorp, "awncorp@cpan.org" LICENSECopyright (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.
|