Debian::DEP12(3pm) | User Contributed Perl Documentation | Debian::DEP12(3pm) |
NAME¶
Debian::DEP12 - interface to Debian DEP 12 format
SYNOPSIS¶
use Debian::DEP12; my $meta = Debian::DEP12->new; $meta->set( 'Bug-Database', 'https://github.com/merkys/Debian-DEP12/issues' ); $meta->validate;
DESCRIPTION¶
Debian::DEP12 is an object-oriented interface for Debian DEP 12 format, also known as debian/upstream/metadata. Primary focus of the initial development was validation and fixing of DEP 12 data.
Contributions welcome!
METHODS¶
new( $what )¶
Creates a new Debian::DEP12 instance from either YAML, Text::BibTeX::Entry or Text::BibTeX::File instances, or plain Perl hash reference with DEP 12 fields and their values.
fields()¶
Returns an array of fields defined in the instance in any order.
get( $field )¶
Returns value of a field.
set( $field, $value )¶
Sets a new value for a field. Returns the old value.
delete( $field )¶
Unsets value for a field. Returns the old value.
to_YAML()¶
Returns a string with YAML representation.
validate()¶
Performs checks of DEP 12 data in the instance and returns an array of validation messages as instances of Debian::DEP12::ValidationWarning.
SEE ALSO¶
For the description of DEP 12 refer to <https://dep-team.pages.debian.net/deps/dep12/>.
AUTHORS¶
Andrius Merkys, <merkys@cpan.org>
2022-10-16 | perl v5.34.0 |