NAME
Wikibase::Datatype::Value - Wikibase value datatype.
SYNOPSIS
use Wikibase::Datatype::Value;
my $obj = Wikibase::Datatype::Value->new(%params);
my $type = $obj->type;
my $value = $obj->value;
DESCRIPTION
This datatype is base class for all Value datatypes.
METHODS
new
my $obj = Wikibase::Datatype::Value->new(%params);
Constructor.
Returns instance of object.
type
Type of instance. Default value is undef.
value
Value of instance. Parameter is required.
type
my $type = $obj->type;
Get type.
Returns string.
value
my $value = $obj->value;
Get value.
Returns string.
ERRORS
new():
From Mo::utils::check_required():
Parameter 'value' is required.
Parameter 'type' is required.
EXAMPLE
use strict;
use warnings;
use Wikibase::Datatype::Value;
# Object.
my $obj = Wikibase::Datatype::Value->new(
'value' => 'foo',
'type' => 'string',
);
# Get value.
my $value = $obj->value;
# Get type.
my $type = $obj->type;
# Print out.
print "Value: $value\n";
print "Type: $type\n";
# Output:
# Value: foo
# Type: string
DEPENDENCIES
SEE ALSO
- Wikibase::Datatype::Value::Globecoordinate
-
Wikibase globe coordinate value datatype.
- Wikibase::Datatype::Value::Item
-
Wikibase item value datatype.
- Wikibase::Datatype::Value::Monolingual
-
Wikibase monolingual value datatype.
- Wikibase::Datatype::Value::Property
-
Wikibase property value datatype.
- Wikibase::Datatype::Value::Quantity
-
Wikibase quantity value datatype.
- Wikibase::Datatype::Value::Sense
-
Wikibase sense value datatype.
- Wikibase::Datatype::Value::String
-
Wikibase string value datatype.
- Wikibase::Datatype::Value::Time
-
Wikibase time value datatype.
REPOSITORY
https://github.com/michal-josef-spacek/Wikibase-Datatype
AUTHOR
Michal Josef Špaček mailto:skim@cpan.org
LICENSE AND COPYRIGHT
© 2020-2023 Michal Josef Špaček
BSD 2-Clause License
VERSION
0.33