From 1d8dd5fc7934354cd821bd5d91a0e1e468c16490 Mon Sep 17 00:00:00 2001 From: Chris 'BinGOs' Williams Date: Tue, 13 Dec 2011 18:06:55 +0000 Subject: [PATCH] Update CPAN-Meta-YAML to CPAN version 0.005 [DELTA] 0.005 2011-12-13 12:57:24 EST5EDT - Generated from ADAMK/YAML-Tiny-1.50.tar.gz - Fix documentation to clarify that users are responsible for UTF-8 encoding/decoding --- Porting/Maintainers.pl | 2 +- cpan/CPAN-Meta-YAML/lib/CPAN/Meta/YAML.pm | 38 +++++++++++++++++-------------- pod/perldelta.pod | 4 ++++ 3 files changed, 26 insertions(+), 18 deletions(-) diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index a3a7f8a..134b9fc 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -509,7 +509,7 @@ use File::Glob qw(:case); 'CPAN::Meta::YAML' => { 'MAINTAINER' => 'dagolden', - 'DISTRIBUTION' => 'DAGOLDEN/CPAN-Meta-YAML-0.004.tar.gz', + 'DISTRIBUTION' => 'DAGOLDEN/CPAN-Meta-YAML-0.005.tar.gz', 'FILES' => q[cpan/CPAN-Meta-YAML], 'EXCLUDED' => [ 't/04_scalar.t', # requires YAML.pm diff --git a/cpan/CPAN-Meta-YAML/lib/CPAN/Meta/YAML.pm b/cpan/CPAN-Meta-YAML/lib/CPAN/Meta/YAML.pm index 1b1ae99..7277d42 100644 --- a/cpan/CPAN-Meta-YAML/lib/CPAN/Meta/YAML.pm +++ b/cpan/CPAN-Meta-YAML/lib/CPAN/Meta/YAML.pm @@ -1,6 +1,6 @@ package CPAN::Meta::YAML; { - $CPAN::Meta::YAML::VERSION = '0.004'; + $CPAN::Meta::YAML::VERSION = '0.005'; } use strict; @@ -647,26 +647,26 @@ CPAN::Meta::YAML - Read and write a subset of YAML for CPAN Meta files =head1 VERSION -version 0.004 +version 0.005 =head1 SYNOPSIS use CPAN::Meta::YAML; - # methods for files - $yaml = CPAN::Meta::YAML->read('META.yml'); - $yaml->write('MYMETA.yml'); - - # methods for strings - $yaml_text = $yaml->write_string; - $yaml = CPAN::Meta::YAML->read_string($yaml_text); + # 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 - my $meta = $yaml->[0]; + $meta = $yaml->[0]; - # handling errors - $yaml->write($file) + # writing a META file + $yaml_text = $yaml->write_string or die CPAN::Meta::YAML->errstr; + open $fh, ">:utf8", "META.yml"; + print $fh $yaml_text; =head1 DESCRIPTION @@ -674,6 +674,10 @@ This module implements a subset of the YAML specification for use in reading and writing CPAN metadata files like F and F. It should not be used for any other general YAML parsing or generation task. +NOTE: META.yml (and MYMETA.yml) files should be UTF-8 encoded. Users are +responsible for proper encoding and decoding. In particular, the C and +C methods do B support UTF-8 and should not be used. + =head1 SUPPORT This module is currently derived from L by Adam Kennedy. If @@ -691,18 +695,18 @@ L, L, L =head2 Bugs / Feature Requests -Please report any bugs or feature requests by email to C, or through -the web interface at L. You will be automatically notified of any -progress on the request by the system. +Please report any bugs or feature requests through the issue tracker +at L. +You will be notified automatically of any progress on your issue. =head2 Source Code This is open source software. The code repository is available for public review and contribution under the terms of the license. -L +L - git clone http://github.com/dagolden/cpan-meta-yaml + git clone https://github.com/dagolden/cpan-meta-yaml.git =head1 AUTHORS diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 7f65ef6..3f62a42 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -262,6 +262,10 @@ L has been upgraded from version 2.042 to version 2.045. =item * +L has been upgraded from version 0.004 to version 0.005. + +=item * + L has been upgraded from version 0.9112 to version 0.9113. =item * -- 2.7.4