---
name: "Perinci::Object::Metadata"
section: "3pm"
platform: "linux"
package: "libperinci-object-perl"
version: "0.311-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Perinci::Object::Metadata"
---

# Perinci::Object::Metadata(3pm)

Base class for Perinci::Object metadata classes

## NAME

Perinci::Object::Metadata - Base class for Perinci::Object metadata classes

## VERSION

This document describes version 0.311 of Perinci::Object::Metadata (from Perl distribution Perinci-Object), released on 2020-01-02.

## METHODS

### new =\> obj

Constructor.

### v =\> float

Get version.

### as\_struct =\> hash

Get underlying data structure.

### type =\> str

Return type (e.g. `"function"`, `"package"`).

### langprop(\[ \\%opts, \]$prop\[, $new\_value\])

Get or set property value in the specified language (i.e., either in `"prop"` or `"prop.alt.lang.XXX"` properties).

Known options:

- •

  lang =\> STR

  Defaults to metadata's `"default_lang"` (which in turns default to `"en_US"` if unspecified).

- •

  mark\_different\_lang =\> BOOL (defaults to 1)

  If set to true, text with different language than the language requested will be marked, e.g. `"I love you"` requested in Indonesian language where the value for that language is unavailable will result in `"{en_US I love you}"` being returned.

### name(\[ $new\_value \]) =\> $value

Get or set `"name"` property. Will call `"langprop()"`.

### summary(\[ $new\_value \]) =\> $value

Get or set `"summary"` property. Will call `"langprop()"`.

### description(\[ $new\_value \]) =\> $value

Get or set `"description"` property. Will call `"langprop()"`.

### caption(\[ $new\_value \]) =\> $value

Get or set `"caption"` property. Will call `"langprop()"`.

## HOMEPAGE

Please visit the project's homepage at \<https://metacpan.org/release/Perinci-Object\>.

## SOURCE

Source repository is at \<https://github.com/perlancar/perl-Perinci-Object\>.

## BUGS

Please report any bugs or feature requests on the bugtracker website \<https://github.com/perlancar/perl-Perinci-Object/issues\>

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

## AUTHOR

perlancar \<perlancar@cpan.org\>

## COPYRIGHT AND LICENSE

This software is copyright (c) 2021, 2017, 2016, 2015, 2014, 2013, 2012, 2011 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
