.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "CPAN::Meta::YAML 3perl" .TH CPAN::Meta::YAML 3perl 2024-05-30 "perl v5.38.2" "Perl Programmers Reference Guide" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME CPAN::Meta::YAML \- Read and write a subset of YAML for CPAN Meta files .SH VERSION .IX Header "VERSION" version 0.018 .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& use CPAN::Meta::YAML; \& \& # reading a META file \& open $fh, "<:utf8", "META.yml"; \& $yaml_text = do { local $/; <$fh> }; \& $yaml = CPAN::Meta::YAML\->read_string($yaml_text) \& or die CPAN::Meta::YAML\->errstr; \& \& # finding the metadata \& $meta = $yaml\->[0]; \& \& # writing a META file \& $yaml_text = $yaml\->write_string \& or die CPAN::Meta::YAML\->errstr; \& open $fh, ">:utf8", "META.yml"; \& print $fh $yaml_text; .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" This module implements a subset of the YAML specification for use in reading and writing CPAN metadata files like \fIMETA.yml\fR and \fIMYMETA.yml\fR. It should not be used for any other general YAML parsing or generation task. .PP NOTE: \fIMETA.yml\fR (and \fIMYMETA.yml\fR) files should be UTF\-8 encoded. Users are responsible for proper encoding and decoding. In particular, the \f(CW\*(C`read\*(C'\fR and \&\f(CW\*(C`write\*(C'\fR methods do \fBnot\fR support UTF\-8 and should not be used. .SH SUPPORT .IX Header "SUPPORT" This module is currently derived from YAML::Tiny by Adam Kennedy. If there are bugs in how it parses a particular META.yml file, please file a bug report in the YAML::Tiny bugtracker: .SH "SEE ALSO" .IX Header "SEE ALSO" YAML::Tiny, YAML, YAML::XS .SH AUTHORS .IX Header "AUTHORS" .IP \(bu 4 Adam Kennedy .IP \(bu 4 David Golden .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2010 by Adam Kennedy. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.