NAME

Wikibase::Datatype::Print::Value - Wikibase value pretty print helpers.

SYNOPSIS

use Wikibase::Datatype::Print::Value qw(print);

my $pretty_print_string = print($obj, $opts_hr);
my @pretty_print_lines = print($obj, $opts_hr);

SUBROUTINES

print

my $pretty_print_string = print($obj, $opts_hr);
my @pretty_print_lines = print($obj, $opts_hr);

Construct pretty print output for Wikibase::Datatype::Value object.

Returns string in scalar context. Returns list of lines in array context.

ERRORS

print():
        Object isn't 'Wikibase::Datatype::Value'.
        Type '%s' is unsupported.

EXAMPLE

use strict;
use warnings;

use Wikibase::Datatype::Print::Value;
use Wikibase::Datatype::Value::Item;

# Object.
my $obj = Wikibase::Datatype::Value::Item->new(
        'value' => 'Q123',
);

# Print.
print Wikibase::Datatype::Print::Value::print($obj)."\n";

# Output:
# Q123

DEPENDENCIES

Error::Pure, Exporter, Readonly, Wikibase::Datatype::Print::Value::Globecoordinate, Wikibase::Datatype::Print::Value::Item, Wikibase::Datatype::Print::Value::Lexeme, Wikibase::Datatype::Print::Value::Monolingual, Wikibase::Datatype::Print::Value::Property, Wikibase::Datatype::Print::Value::Quantity, Wikibase::Datatype::Print::Value::Sense, Wikibase::Datatype::Print::Value::String, Wikibase::Datatype::Print::Value::Time.

SEE ALSO

Wikibase::Datatype::Value

Wikibase value datatype.

REPOSITORY

https://github.com/michal-josef-spacek/Wikibase-Datatype-Print

AUTHOR

Michal Josef Špaček mailto:skim@cpan.org

http://skim.cz

LICENSE AND COPYRIGHT

© 2020-2023 Michal Josef Špaček

BSD 2-Clause License

VERSION

0.16