mirror of
https://github.com/Perl/perl5.git
synced 2026-01-26 16:39:36 +00:00
Update CPAN::Meta::YAML to 0.019
This commit is contained in:
parent
3be0722ca4
commit
e2b6691a0f
94
MANIFEST
94
MANIFEST
@ -642,56 +642,58 @@ cpan/CPAN-Meta-Requirements/t/from-hash.t
|
||||
cpan/CPAN-Meta-Requirements/t/merge.t
|
||||
cpan/CPAN-Meta-Requirements/t/strings.t
|
||||
cpan/CPAN-Meta-YAML/lib/CPAN/Meta/YAML.pm CPAN-Meta-YAML files
|
||||
cpan/CPAN-Meta-YAML/t/01_api.t
|
||||
cpan/CPAN-Meta-YAML/t/01_api.t Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/01_compile.t CPAN-Meta-YAML files
|
||||
cpan/CPAN-Meta-YAML/t/10_read.t
|
||||
cpan/CPAN-Meta-YAML/t/11_read_string.t
|
||||
cpan/CPAN-Meta-YAML/t/12_write.t
|
||||
cpan/CPAN-Meta-YAML/t/13_write_string.t
|
||||
cpan/CPAN-Meta-YAML/t/10_read.t Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/11_read_string.t Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/12_write.t Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/13_write_string.t Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/20_subclass.t CPAN-Meta-YAML files
|
||||
cpan/CPAN-Meta-YAML/t/21_yamlpm_compat.t
|
||||
cpan/CPAN-Meta-YAML/t/30_yaml_spec_tml.t
|
||||
cpan/CPAN-Meta-YAML/t/31_local_tml.t
|
||||
cpan/CPAN-Meta-YAML/t/32_world_tml.t
|
||||
cpan/CPAN-Meta-YAML/t/86_fail.t
|
||||
cpan/CPAN-Meta-YAML/t/data/ascii.yml
|
||||
cpan/CPAN-Meta-YAML/t/data/latin1.yml
|
||||
cpan/CPAN-Meta-YAML/t/21_yamlpm_compat.t Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/30_yaml_spec_tml.t Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/31_local_tml.t Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/32_world_tml.t Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/86_fail.t Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/data/ascii.yml CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/data/latin1.yml CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/data/multibyte.yml CPAN-Meta-YAML files
|
||||
cpan/CPAN-Meta-YAML/t/data/utf_16_le_bom.yml CPAN-Meta-YAML files
|
||||
cpan/CPAN-Meta-YAML/t/data/utf_8_bom.yml
|
||||
cpan/CPAN-Meta-YAML/t/lib/SubtestCompat.pm
|
||||
cpan/CPAN-Meta-YAML/t/lib/TestBridge.pm
|
||||
cpan/CPAN-Meta-YAML/t/lib/TestML/Tiny.pm
|
||||
cpan/CPAN-Meta-YAML/t/lib/TestUtils.pm
|
||||
cpan/CPAN-Meta-YAML/t/README.md
|
||||
cpan/CPAN-Meta-YAML/t/tml
|
||||
cpan/CPAN-Meta-YAML/t/tml-local/dump-error/circular.tml
|
||||
cpan/CPAN-Meta-YAML/t/tml-local/load-error/document.tml
|
||||
cpan/CPAN-Meta-YAML/t/tml-local/load-error/scalar.tml
|
||||
cpan/CPAN-Meta-YAML/t/tml-local/load-error/tag.tml
|
||||
cpan/CPAN-Meta-YAML/t/tml-local/load-warning/document.tml
|
||||
cpan/CPAN-Meta-YAML/t/tml-local/perl-to-yaml/quoting.tml
|
||||
cpan/CPAN-Meta-YAML/t/tml-local/yaml-roundtrip/collection.tml
|
||||
cpan/CPAN-Meta-YAML/t/tml-local/yaml-roundtrip/comment.tml
|
||||
cpan/CPAN-Meta-YAML/t/tml-local/yaml-roundtrip/document.tml
|
||||
cpan/CPAN-Meta-YAML/t/tml-local/yaml-roundtrip/mapping.tml
|
||||
cpan/CPAN-Meta-YAML/t/tml-local/yaml-roundtrip/quoting.tml
|
||||
cpan/CPAN-Meta-YAML/t/tml-local/yaml-roundtrip/scalar.tml
|
||||
cpan/CPAN-Meta-YAML/t/tml-local/yaml-roundtrip/sequence.tml
|
||||
cpan/CPAN-Meta-YAML/t/tml-spec/basic-data.tml
|
||||
cpan/CPAN-Meta-YAML/t/tml-spec/unicode.tml
|
||||
cpan/CPAN-Meta-YAML/t/tml-world/Acme-Time-Baby.tml
|
||||
cpan/CPAN-Meta-YAML/t/tml-world/Data-Swap.tml
|
||||
cpan/CPAN-Meta-YAML/t/tml-world/Games-Nintendo-Wii-Mii.tml
|
||||
cpan/CPAN-Meta-YAML/t/tml-world/HTML-WebDAO.tml
|
||||
cpan/CPAN-Meta-YAML/t/tml-world/ITS-SIN-FIDS-Content-XML.tml
|
||||
cpan/CPAN-Meta-YAML/t/tml-world/Plagger.tml
|
||||
cpan/CPAN-Meta-YAML/t/tml-world/Spreadsheet-Read.tml
|
||||
cpan/CPAN-Meta-YAML/t/tml-world/Template-Provider-Unicode-Japanese.tml
|
||||
cpan/CPAN-Meta-YAML/t/tml-world/toolbar.tml
|
||||
cpan/CPAN-Meta-YAML/t/tml-world/Vanilla-Perl.tml
|
||||
cpan/CPAN-Meta-YAML/t/tml-world/YAML-Tiny-META.tml
|
||||
cpan/CPAN-Meta-YAML/t/tml-world/yaml_org.tml
|
||||
cpan/CPAN-Meta-YAML/t/data/utf_8_bom.yml CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/lib/SubtestCompat.pm Module related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/lib/TestBridge.pm Module related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/lib/TestML/Tiny.pm Module related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/lib/TestUtils.pm Module related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/README.md CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/tml CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/tml-local/dump-error/circular.tml Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/tml-local/load-error/document.tml Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/tml-local/load-error/scalar.tml Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/tml-local/load-error/tag.tml Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/tml-local/load-warning/document.tml Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/tml-local/perl-to-yaml/quoting.tml Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/tml-local/yaml-roundtrip/collection.tml Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/tml-local/yaml-roundtrip/comment.tml Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/tml-local/yaml-roundtrip/document.tml Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/tml-local/yaml-roundtrip/mapping.tml Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/tml-local/yaml-roundtrip/quoting.tml Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/tml-local/yaml-roundtrip/scalar.tml Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/tml-local/yaml-roundtrip/sequence.tml Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/tml-spec/basic-data.tml Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/tml-spec/multiline.tml CPAN-Meta-YAML
|
||||
cpan/CPAN-Meta-YAML/t/tml-spec/unicode.tml Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/tml-world/Acme-Time-Baby.tml Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/tml-world/Data-Swap.tml Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/tml-world/Games-Nintendo-Wii-Mii.tml Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/tml-world/HTML-WebDAO.tml Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/tml-world/ITS-SIN-FIDS-Content-XML.tml Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/tml-world/Plagger.tml Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/tml-world/Spreadsheet-Read.tml Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/tml-world/Template-Provider-Unicode-Japanese.tml Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/tml-world/toolbar.tml Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/tml-world/Vanilla-Perl.tml Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/tml-world/YAML-Tiny-META.tml Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/t/tml-world/yaml_org.tml Test file related to CPAN::Meta::YAML
|
||||
cpan/CPAN-Meta-YAML/weaver.ini CPAN-Meta-YAML
|
||||
cpan/DB_File/config.in Part of Berkeley DB configuration
|
||||
cpan/DB_File/DB_File.pm Berkeley DB extension Perl module
|
||||
cpan/DB_File/DB_File.xs Berkeley DB extension external subroutines
|
||||
|
||||
2
META.yml
2
META.yml
@ -106,4 +106,4 @@ resources:
|
||||
license: https://dev.perl.org/licenses/
|
||||
repository: https://github.com/Perl/perl5
|
||||
version: '5.041007'
|
||||
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
|
||||
x_serialization_backend: 'CPAN::Meta::YAML version 0.019'
|
||||
|
||||
@ -329,7 +329,8 @@ our %Modules = (
|
||||
},
|
||||
|
||||
'CPAN::Meta::YAML' => {
|
||||
'DISTRIBUTION' => 'DAGOLDEN/CPAN-Meta-YAML-0.018.tar.gz',
|
||||
'DISTRIBUTION' => 'ETHER/CPAN-Meta-YAML-0.019.tar.gz',
|
||||
'SYNCINFO' => 'corion on Mon Dec 16 09:12:25 2024',
|
||||
'FILES' => q[cpan/CPAN-Meta-YAML],
|
||||
'EXCLUDED' => [
|
||||
't/00-report-prereqs.t',
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
use 5.008001; # sane UTF-8 support
|
||||
use strict;
|
||||
use warnings;
|
||||
package CPAN::Meta::YAML; # git description: v1.68-2-gcc5324e
|
||||
package CPAN::Meta::YAML; # git description: v1.74-6-g56f1f15
|
||||
# XXX-INGY is 5.8.1 too old/broken for utf8?
|
||||
# XXX-XDG Lancaster consensus was that it was sufficient until
|
||||
# proven otherwise
|
||||
$CPAN::Meta::YAML::VERSION = '0.018';
|
||||
$CPAN::Meta::YAML::VERSION = '0.019';
|
||||
; # original $VERSION removed by Doppelgaenger
|
||||
|
||||
#####################################################################
|
||||
@ -138,7 +138,10 @@ my %UNESCAPES = (
|
||||
# These 3 values have special meaning when unquoted and using the
|
||||
# default YAML schema. They need quotes if they are strings.
|
||||
my %QUOTE = map { $_ => 1 } qw{
|
||||
null true false
|
||||
null Null NULL
|
||||
y Y yes Yes YES n N no No NO
|
||||
true True TRUE false False FALSE
|
||||
on On ON off Off OFF
|
||||
};
|
||||
|
||||
# The commented out form is simpler, but overloaded the Perl regex
|
||||
@ -373,7 +376,7 @@ sub _load_scalar {
|
||||
while ( @$lines ) {
|
||||
$lines->[0] =~ /^(\s*)/;
|
||||
last unless length($1) >= $indent->[-1];
|
||||
push @multiline, substr(shift(@$lines), length($1));
|
||||
push @multiline, substr(shift(@$lines), $indent->[-1]);
|
||||
}
|
||||
|
||||
my $j = (substr($string, 0, 1) eq '>') ? ' ' : "\n";
|
||||
@ -569,10 +572,8 @@ sub _dump_file {
|
||||
if ( _can_flock() ) {
|
||||
# Open without truncation (truncate comes after lock)
|
||||
my $flags = Fcntl::O_WRONLY()|Fcntl::O_CREAT();
|
||||
sysopen( $fh, $file, $flags );
|
||||
unless ( $fh ) {
|
||||
$self->_error("Failed to open file '$file' for writing: $!");
|
||||
}
|
||||
sysopen( $fh, $file, $flags )
|
||||
or $self->_error("Failed to open file '$file' for writing: $!");
|
||||
|
||||
# Use no translation and strict UTF-8
|
||||
binmode( $fh, ":raw:encoding(UTF-8)");
|
||||
@ -878,7 +879,7 @@ CPAN::Meta::YAML - Read and write a subset of YAML for CPAN Meta files
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
version 0.018
|
||||
version 0.019
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
@ -934,6 +935,12 @@ David Golden <dagolden@cpan.org>
|
||||
|
||||
=back
|
||||
|
||||
=head1 CONTRIBUTOR
|
||||
|
||||
=for stopwords Karen Etheridge
|
||||
|
||||
Karen Etheridge <ether@cpan.org>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
This software is copyright (c) 2010 by Adam Kennedy.
|
||||
|
||||
@ -22,7 +22,7 @@ subtest "default exports" => sub {
|
||||
|
||||
subtest "all exports" => sub {
|
||||
package main::all_exports;
|
||||
use Test::More;
|
||||
use Test::More 0.88;
|
||||
use CPAN::Meta::YAML qw/Load Dump LoadFile DumpFile freeze thaw/;
|
||||
ok( defined(&Load), 'Found exported Load function' );
|
||||
ok( defined(&Dump), 'Found exported Dump function' );
|
||||
|
||||
@ -11,7 +11,7 @@ BEGIN {
|
||||
use Test::More 0.88;
|
||||
|
||||
# Check their perl version
|
||||
ok( $] ge '5.008001', "Your perl is new enough" );
|
||||
ok( "$]" >= 5.008001, "Your perl is new enough" );
|
||||
|
||||
# Does the module load
|
||||
require_ok( 'CPAN::Meta::YAML' );
|
||||
|
||||
@ -16,6 +16,7 @@ diag 'using JSON backend: ' . $JSON . ' ' . $JSON->VERSION
|
||||
# Each spec test will need a different bridge and arguments:
|
||||
my @spec_tests = (
|
||||
['t/tml-spec/basic-data.tml', 'test_yaml_json', $JSON],
|
||||
['t/tml-spec/multiline.tml', 'test_yaml_json', $JSON],
|
||||
# This test is currently failing massively. We use LAST to only run what is
|
||||
# covered so far.
|
||||
['t/tml-spec/unicode.tml', 'test_code_point'], # uses JSON::PP
|
||||
|
||||
@ -62,5 +62,18 @@ unless ( Test::More->can("subtest") ) {
|
||||
};
|
||||
push @EXPORT, 'subtest';
|
||||
}
|
||||
elsif ( !eval { Test::More->VERSION(0.95_01) } ) {
|
||||
my $subtest = \&Test::Builder::subtest;
|
||||
no warnings 'redefine';
|
||||
*Test::Builder::subtest = sub {
|
||||
my ($self, $name, $subtests, @args) = @_;
|
||||
my $sub = sub {
|
||||
$subtests->(@_);
|
||||
$self->done_testing
|
||||
unless $self->{Have_Plan} || $self->{No_Plan} || $self->{Skip_All};
|
||||
};
|
||||
return $self->$subtest($name, $sub, @args);
|
||||
};
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
@ -3,17 +3,12 @@ package TestBridge;
|
||||
use strict;
|
||||
use warnings;
|
||||
use lib 't/lib';
|
||||
use open ':std', ':encoding(UTF-8)'; # force stdin, stdout, stderr into utf8
|
||||
use Test::More 0.88;
|
||||
use SubtestCompat;
|
||||
use TestUtils;
|
||||
use TestML::Tiny;
|
||||
|
||||
BEGIN {
|
||||
$| = 1;
|
||||
binmode(Test::More->builder->$_, ":utf8")
|
||||
for qw/output failure_output todo_output/;
|
||||
}
|
||||
|
||||
use CPAN::Meta::YAML;
|
||||
|
||||
use Exporter ();
|
||||
@ -352,11 +347,13 @@ sub test_code_point {
|
||||
my $data = { chr($code) => chr($code) };
|
||||
my $dump = CPAN::Meta::YAML::Dump($data);
|
||||
$dump =~ s/^---\n//;
|
||||
is $dump, $yaml, "Dump key and value of code point char $code";
|
||||
ok($dump eq $yaml or "'$dump'" eq $yaml,
|
||||
"Dump key and value of code point char $code");
|
||||
|
||||
my $yny = CPAN::Meta::YAML::Dump(CPAN::Meta::YAML::Load($yaml));
|
||||
$yny =~ s/^---\n//;
|
||||
is $yny, $yaml, "YAML for code point $code YNY roundtrips";
|
||||
ok($yny eq $yaml or "'$yny'" eq $yaml,
|
||||
"YAML for code point $code YNY roundtrips");
|
||||
|
||||
my $nyn = CPAN::Meta::YAML::Load(CPAN::Meta::YAML::Dump($data));
|
||||
cmp_deeply( $nyn, $data, "YAML for code point $code NYN roundtrips" );
|
||||
|
||||
@ -85,6 +85,8 @@ __END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
=for stopwords tml
|
||||
|
||||
t/tml - run .tml files matching a pattern
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
33
cpan/CPAN-Meta-YAML/t/tml-spec/multiline.tml
Normal file
33
cpan/CPAN-Meta-YAML/t/tml-spec/multiline.tml
Normal file
@ -0,0 +1,33 @@
|
||||
=== basic multiline
|
||||
# This is just a simple one key hash.
|
||||
--- yaml
|
||||
a: |
|
||||
ciao
|
||||
a tutti
|
||||
--- json
|
||||
{"a":"ciao\na tutti\n"}
|
||||
|
||||
=== multiline with inner indentation
|
||||
# This is just a simple one key hash.
|
||||
--- yaml
|
||||
a: |
|
||||
ciao
|
||||
a
|
||||
tutti
|
||||
--- json
|
||||
{"a":"ciao\n a\ntutti\n"}
|
||||
|
||||
=== two multilines with variable inner indentation
|
||||
# This is just a simple one key hash.
|
||||
--- yaml
|
||||
- |
|
||||
ciao
|
||||
a
|
||||
tutti
|
||||
- |
|
||||
quanti
|
||||
voi
|
||||
amici
|
||||
--- json
|
||||
["ciao\n a\n tutti\n","quanti\n voi\namici\n"]
|
||||
|
||||
26
cpan/CPAN-Meta-YAML/weaver.ini
Normal file
26
cpan/CPAN-Meta-YAML/weaver.ini
Normal file
@ -0,0 +1,26 @@
|
||||
[@CorePrep]
|
||||
|
||||
[-SingleEncoding]
|
||||
|
||||
[Name]
|
||||
[Version]
|
||||
|
||||
[Region / prelude]
|
||||
|
||||
[Generic / DEPRECATED]
|
||||
|
||||
[Generic / SYNOPSIS]
|
||||
[Generic / DESCRIPTION]
|
||||
[Generic / USAGE]
|
||||
|
||||
[Leftovers]
|
||||
|
||||
[Region / postlude]
|
||||
|
||||
[Authors]
|
||||
[Contributors]
|
||||
[Legal]
|
||||
|
||||
[-Transformer / Lists]
|
||||
transformer = List
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user