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

Wikibase::Datatype::Value::String - Wikibase string value datatype.

SYNOPSIS

use Wikibase::Datatype::Value::String;

my $obj = Wikibase::Datatype::Value::String->new(%params);
my $type = $obj->type;
my $value = $obj->value;

DESCRIPTION

This datatype is string class for representation of common string. There are upper datatypes as commonsMedia, external-id, geo-shape, math, musical-notation, string, tabular-data and url, which uses this data type.

METHODS

new

my $obj = Wikibase::Datatype::Value::String->new(%params);

Constructor.

Returns instance of object.

  • value

    Value of instance. Parameter is required.

type

my $type = $obj->type;

Get type. This is constant 'string'.

Returns string.

value

my $value = $obj->value;

Get value.

Returns string.

ERRORS

new():
        From Wikibase::Datatype::Value::new():
                Parameter 'value' is required.

EXAMPLE

use strict;
use warnings;

use Wikibase::Datatype::Value::String;

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

# Get type.
my $type = $obj->type;

# Get value.
my $value = $obj->value;

# Print out.
print "Type: $type\n";
print "Value: $value\n";

# Output:
# Type: string
# Value: foo

DEPENDENCIES

Mo, Wikibase::Datatype::Value.

SEE ALSO

Wikibase::Datatype::Value

Wikibase datatypes.

REPOSITORY

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

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.33