Update CPAN-Meta-YAML to CPAN version 0.005
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Tue, 13 Dec 2011 18:06:55 +0000 (18:06 +0000)
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Tue, 13 Dec 2011 19:01:47 +0000 (19:01 +0000)
  [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
cpan/CPAN-Meta-YAML/lib/CPAN/Meta/YAML.pm
pod/perldelta.pod

index a3a7f8a..134b9fc 100755 (executable)
@@ -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
index 1b1ae99..7277d42 100644 (file)
@@ -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<META.yml> and F<MYMETA.yml>.  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<read> and
+C<write> methods do B<not> support UTF-8 and should not be used.
+
 =head1 SUPPORT
 
 This module is currently derived from L<YAML::Tiny> by Adam Kennedy.  If
@@ -691,18 +695,18 @@ L<YAML::Tiny>, L<YAML>, L<YAML::XS>
 
 =head2 Bugs / Feature Requests
 
-Please report any bugs or feature requests by email to C<bug-cpan-meta-yaml at rt.cpan.org>, or through
-the web interface at L<http://rt.cpan.org/Public/Dist/Display.html?Name=CPAN-Meta-YAML>. 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<http://rt.cpan.org/Public/Dist/Display.html?Name=CPAN-Meta-YAML>.
+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<http://github.com/dagolden/cpan-meta-yaml>
+L<https://github.com/dagolden/cpan-meta-yaml>
 
-  git clone http://github.com/dagolden/cpan-meta-yaml
+  git clone https://github.com/dagolden/cpan-meta-yaml.git
 
 =head1 AUTHORS
 
index 7f65ef6..3f62a42 100644 (file)
@@ -262,6 +262,10 @@ L<Compress::Raw::Bzip2> has been upgraded from version 2.042 to version 2.045.
 
 =item *
 
+L<CPAN::Meta::YAML> has been upgraded from version 0.004 to version 0.005.
+
+=item *
+
 L<CPANPLUS> has been upgraded from version 0.9112 to version 0.9113.
 
 =item *