diff options
Diffstat (limited to 'systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser')
30 files changed, 100 insertions, 74 deletions
diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Aggregator.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Aggregator.pm index 1f4ff5d961..af961e8b73 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Aggregator.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Aggregator.pm @@ -12,11 +12,11 @@ TAP::Parser::Aggregator - Aggregate TAP::Parser results =head1 VERSION -Version 3.43 +Version 3.44 =cut -our $VERSION = '3.43'; +our $VERSION = '3.44'; =head1 SYNOPSIS diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Grammar.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Grammar.pm index 0cf4d5b4c7..398396ca13 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Grammar.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Grammar.pm @@ -14,11 +14,11 @@ TAP::Parser::Grammar - A grammar for the Test Anything Protocol. =head1 VERSION -Version 3.43 +Version 3.44 =cut -our $VERSION = '3.43'; +our $VERSION = '3.44'; =head1 SYNOPSIS diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Iterator.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Iterator.pm index b516929b05..1ce907f49d 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Iterator.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Iterator.pm @@ -11,11 +11,11 @@ TAP::Parser::Iterator - Base class for TAP source iterators =head1 VERSION -Version 3.43 +Version 3.44 =cut -our $VERSION = '3.43'; +our $VERSION = '3.44'; =head1 SYNOPSIS diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Iterator/Array.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Iterator/Array.pm index 3ea348d608..8f8dc4681e 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Iterator/Array.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Iterator/Array.pm @@ -11,11 +11,11 @@ TAP::Parser::Iterator::Array - Iterator for array-based TAP sources =head1 VERSION -Version 3.43 +Version 3.44 =cut -our $VERSION = '3.43'; +our $VERSION = '3.44'; =head1 SYNOPSIS diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Iterator/Process.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Iterator/Process.pm index 8e95a44a23..144fc13fcf 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Iterator/Process.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Iterator/Process.pm @@ -16,11 +16,11 @@ TAP::Parser::Iterator::Process - Iterator for process-based TAP sources =head1 VERSION -Version 3.43 +Version 3.44 =cut -our $VERSION = '3.43'; +our $VERSION = '3.44'; =head1 SYNOPSIS diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Iterator/Stream.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Iterator/Stream.pm index 305453124f..dab28ea11a 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Iterator/Stream.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Iterator/Stream.pm @@ -11,11 +11,11 @@ TAP::Parser::Iterator::Stream - Iterator for filehandle-based TAP sources =head1 VERSION -Version 3.43 +Version 3.44 =cut -our $VERSION = '3.43'; +our $VERSION = '3.44'; =head1 SYNOPSIS diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/IteratorFactory.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/IteratorFactory.pm index 3529c2f86c..1a61e8260e 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/IteratorFactory.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/IteratorFactory.pm @@ -16,11 +16,11 @@ TAP::Parser::IteratorFactory - Figures out which SourceHandler objects to use fo =head1 VERSION -Version 3.43 +Version 3.44 =cut -our $VERSION = '3.43'; +our $VERSION = '3.44'; =head1 SYNOPSIS diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Multiplexer.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Multiplexer.pm index 164e9af477..328aa49cc0 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Multiplexer.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Multiplexer.pm @@ -4,6 +4,7 @@ use strict; use warnings; use IO::Select; +use Errno; use base 'TAP::Object'; @@ -17,11 +18,11 @@ TAP::Parser::Multiplexer - Multiplex multiple TAP::Parsers =head1 VERSION -Version 3.43 +Version 3.44 =cut -our $VERSION = '3.43'; +our $VERSION = '3.44'; =head1 SYNOPSIS @@ -130,9 +131,10 @@ sub _iter { return ( $parser, $stash, $result ); } - unless (@ready) { + until (@ready) { return unless $sel->count; @ready = $sel->can_read; + last if @ready || $! != Errno::EINTR; } my ( $h, $parser, $stash, @handles ) = @{ shift @ready }; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result.pm index 698402ab83..f5d1c211da 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result.pm @@ -24,11 +24,11 @@ TAP::Parser::Result - Base class for TAP::Parser output objects =head1 VERSION -Version 3.43 +Version 3.44 =cut -our $VERSION = '3.43'; +our $VERSION = '3.44'; =head1 SYNOPSIS diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result/Bailout.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result/Bailout.pm index 38ee45853c..528b0194b9 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result/Bailout.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result/Bailout.pm @@ -11,11 +11,11 @@ TAP::Parser::Result::Bailout - Bailout result token. =head1 VERSION -Version 3.43 +Version 3.44 =cut -our $VERSION = '3.43'; +our $VERSION = '3.44'; =head1 DESCRIPTION diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result/Comment.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result/Comment.pm index a07308ea81..20cac16487 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result/Comment.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result/Comment.pm @@ -11,11 +11,11 @@ TAP::Parser::Result::Comment - Comment result token. =head1 VERSION -Version 3.43 +Version 3.44 =cut -our $VERSION = '3.43'; +our $VERSION = '3.44'; =head1 DESCRIPTION diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result/Plan.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result/Plan.pm index 1029694d57..7da449208d 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result/Plan.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result/Plan.pm @@ -11,11 +11,11 @@ TAP::Parser::Result::Plan - Plan result token. =head1 VERSION -Version 3.43 +Version 3.44 =cut -our $VERSION = '3.43'; +our $VERSION = '3.44'; =head1 DESCRIPTION diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result/Pragma.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result/Pragma.pm index 897e0da658..04a0e17851 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result/Pragma.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result/Pragma.pm @@ -11,11 +11,11 @@ TAP::Parser::Result::Pragma - TAP pragma token. =head1 VERSION -Version 3.43 +Version 3.44 =cut -our $VERSION = '3.43'; +our $VERSION = '3.44'; =head1 DESCRIPTION diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result/Test.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result/Test.pm index e2c9781e16..dbe0817484 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result/Test.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result/Test.pm @@ -11,11 +11,11 @@ TAP::Parser::Result::Test - Test result token. =head1 VERSION -Version 3.43 +Version 3.44 =cut -our $VERSION = '3.43'; +our $VERSION = '3.44'; =head1 DESCRIPTION diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result/Unknown.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result/Unknown.pm index cc04c8a385..1c77dc072c 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result/Unknown.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result/Unknown.pm @@ -11,11 +11,11 @@ TAP::Parser::Result::Unknown - Unknown result token. =head1 VERSION -Version 3.43 +Version 3.44 =cut -our $VERSION = '3.43'; +our $VERSION = '3.44'; =head1 DESCRIPTION diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result/Version.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result/Version.pm index 8a2bd7ec44..c73a762004 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result/Version.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result/Version.pm @@ -11,11 +11,11 @@ TAP::Parser::Result::Version - TAP syntax version token. =head1 VERSION -Version 3.43 +Version 3.44 =cut -our $VERSION = '3.43'; +our $VERSION = '3.44'; =head1 DESCRIPTION diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result/YAML.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result/YAML.pm index 17de945ef0..e20975b757 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result/YAML.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Result/YAML.pm @@ -11,11 +11,11 @@ TAP::Parser::Result::YAML - YAML result token. =head1 VERSION -Version 3.43 +Version 3.44 =cut -our $VERSION = '3.43'; +our $VERSION = '3.44'; =head1 DESCRIPTION diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/ResultFactory.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/ResultFactory.pm index 54d29a265d..894636269b 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/ResultFactory.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/ResultFactory.pm @@ -29,11 +29,11 @@ TAP::Parser::ResultFactory - Factory for creating TAP::Parser output objects =head1 VERSION -Version 3.43 +Version 3.44 =cut -our $VERSION = '3.43'; +our $VERSION = '3.44'; =head2 DESCRIPTION diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Scheduler.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Scheduler.pm index 7e3ddc2c08..3ec5b7ca89 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Scheduler.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Scheduler.pm @@ -13,11 +13,11 @@ TAP::Parser::Scheduler - Schedule tests during parallel testing =head1 VERSION -Version 3.43 +Version 3.44 =cut -our $VERSION = '3.43'; +our $VERSION = '3.44'; =head1 SYNOPSIS diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Scheduler/Job.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Scheduler/Job.pm index bfcb0f76b3..ce6ef14a43 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Scheduler/Job.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Scheduler/Job.pm @@ -10,11 +10,11 @@ TAP::Parser::Scheduler::Job - A single testing job. =head1 VERSION -Version 3.43 +Version 3.44 =cut -our $VERSION = '3.43'; +our $VERSION = '3.44'; =head1 SYNOPSIS diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Scheduler/Spinner.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Scheduler/Spinner.pm index 29f5c0daf1..4cb974c875 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Scheduler/Spinner.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Scheduler/Spinner.pm @@ -10,11 +10,11 @@ TAP::Parser::Scheduler::Spinner - A no-op job. =head1 VERSION -Version 3.43 +Version 3.44 =cut -our $VERSION = '3.43'; +our $VERSION = '3.44'; =head1 SYNOPSIS diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Source.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Source.pm index 74c22cce8b..e91439ac03 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Source.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/Source.pm @@ -14,11 +14,11 @@ TAP::Parser::Source - a TAP source & meta data about it =head1 VERSION -Version 3.43 +Version 3.44 =cut -our $VERSION = '3.43'; +our $VERSION = '3.44'; =head1 SYNOPSIS diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/SourceHandler.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/SourceHandler.pm index f80c1ca25c..b41ca01065 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/SourceHandler.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/SourceHandler.pm @@ -12,11 +12,11 @@ TAP::Parser::SourceHandler - Base class for different TAP source handlers =head1 VERSION -Version 3.43 +Version 3.44 =cut -our $VERSION = '3.43'; +our $VERSION = '3.44'; =head1 SYNOPSIS diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/SourceHandler/Executable.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/SourceHandler/Executable.pm index 0ad412bc49..0aa78ad731 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/SourceHandler/Executable.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/SourceHandler/Executable.pm @@ -16,11 +16,11 @@ TAP::Parser::SourceHandler::Executable - Stream output from an executable TAP so =head1 VERSION -Version 3.43 +Version 3.44 =cut -our $VERSION = '3.43'; +our $VERSION = '3.44'; =head1 SYNOPSIS diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/SourceHandler/File.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/SourceHandler/File.pm index 48f9821051..e93f786b33 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/SourceHandler/File.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/SourceHandler/File.pm @@ -16,11 +16,11 @@ TAP::Parser::SourceHandler::File - Stream TAP from a text file. =head1 VERSION -Version 3.43 +Version 3.44 =cut -our $VERSION = '3.43'; +our $VERSION = '3.44'; =head1 SYNOPSIS diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/SourceHandler/Handle.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/SourceHandler/Handle.pm index 751e68aa30..1b9881cd01 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/SourceHandler/Handle.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/SourceHandler/Handle.pm @@ -16,11 +16,11 @@ TAP::Parser::SourceHandler::Handle - Stream TAP from an IO::Handle or a GLOB. =head1 VERSION -Version 3.43 +Version 3.44 =cut -our $VERSION = '3.43'; +our $VERSION = '3.44'; =head1 SYNOPSIS diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/SourceHandler/Perl.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/SourceHandler/Perl.pm index 26b408a458..ce7a2b427b 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/SourceHandler/Perl.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/SourceHandler/Perl.pm @@ -21,11 +21,11 @@ TAP::Parser::SourceHandler::Perl - Stream TAP from a Perl executable =head1 VERSION -Version 3.43 +Version 3.44 =cut -our $VERSION = '3.43'; +our $VERSION = '3.44'; =head1 SYNOPSIS @@ -62,7 +62,7 @@ won't need to use this module directly. Only votes if $source looks like a file. Casts the following votes: 0.9 if it has a shebang ala "#!...perl" - 0.75 if it has any shebang + 0.3 if it has any shebang 0.8 if it's a .t file 0.9 if it's a .pl file 0.75 if it's in a 't' directory diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/SourceHandler/RawTAP.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/SourceHandler/RawTAP.pm index 9bf3b272a8..c311935bf8 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/SourceHandler/RawTAP.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/SourceHandler/RawTAP.pm @@ -16,11 +16,11 @@ TAP::Parser::SourceHandler::RawTAP - Stream output from raw TAP in a scalar/arra =head1 VERSION -Version 3.43 +Version 3.44 =cut -our $VERSION = '3.43'; +our $VERSION = '3.44'; =head1 SYNOPSIS diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/YAMLish/Reader.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/YAMLish/Reader.pm index eafc37aa0c..1c122300a3 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/YAMLish/Reader.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/YAMLish/Reader.pm @@ -5,16 +5,21 @@ use warnings; use base 'TAP::Object'; -our $VERSION = '3.43'; +our $VERSION = '3.44'; + + # No EBCDIC support on early perls +*to_native = (ord "A" == 65 || $] < 5.008) + ? sub { return shift } + : sub { utf8::unicode_to_native(shift) }; # TODO: # Handle blessed object syntax # Printable characters for escapes my %UNESCAPES = ( - z => "\x00", a => "\x07", t => "\x09", - n => "\x0a", v => "\x0b", f => "\x0c", - r => "\x0d", e => "\x1b", '\\' => '\\', + z => "\x00", a => "\a", t => "\t", + n => "\n", v => "\cK", f => "\f", + r => "\r", e => "\e", '\\' => '\\', ); my $QQ_STRING = qr{ " (?:\\. | [^"])* " }x; @@ -22,6 +27,7 @@ my $HASH_LINE = qr{ ^ ($QQ_STRING|\S+) \s* : \s* (?: (.+?) \s* )? $ }x; my $IS_HASH_KEY = qr{ ^ [\w\'\"] }x; my $IS_END_YAML = qr{ ^ \.\.\. \s* $ }x; my $IS_QQ_STRING = qr{ ^ $QQ_STRING $ }x; +my $IS_ARRAY_LINE = qr{ ^ - \s* ($QQ_STRING|\S+) }x; # new() implementation supplied by TAP::Object @@ -117,7 +123,8 @@ sub _read_qq { $str =~ s/\\"/"/gx; $str =~ s/ \\ ( [tartan\\favez] | x([0-9a-fA-F]{2}) ) - / (length($1) > 1) ? pack("H2", $2) : $UNESCAPES{$1} /gex; + / (length($1) > 1) ? pack("H2", to_native($2)) + : $UNESCAPES{$1} /gex; return $str; } @@ -240,9 +247,17 @@ sub _read_hash { my ( $key, $value ) = ( $self->_read_scalar($1), $2 ); $self->_next; + my ( $next_line, $next_indent ) = $self->_peek; + if ( defined $value ) { $hash->{$key} = $self->_read_scalar($value); } + elsif (not defined $value # no explicit undef ("~") given + and $next_indent <= $limit # next line is same or less indentation + and $next_line !~ $IS_ARRAY_LINE) # arrays can start at same indent + { + $hash->{$key} = undef; + } else { $hash->{$key} = $self->_read_nested; } @@ -269,7 +284,7 @@ TAP::Parser::YAMLish::Reader - Read YAMLish data from iterator =head1 VERSION -Version 3.43 +Version 3.44 =head1 SYNOPSIS diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/YAMLish/Writer.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/YAMLish/Writer.pm index 9d6366c325..1199cf45bf 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/YAMLish/Writer.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/TAP/Parser/YAMLish/Writer.pm @@ -5,17 +5,26 @@ use warnings; use base 'TAP::Object'; -our $VERSION = '3.43'; +our $VERSION = '3.44'; -my $ESCAPE_CHAR = qr{ [ \x00-\x1f \" ] }x; + # No EBCDIC support on early perls +*from_native = (ord "A" == 65 || $] < 5.008) + ? sub { return shift } + : sub { utf8::native_to_unicode(shift) }; + +my $ESCAPE_CHAR = qr{ [ [:cntrl:] \" ] }x; my $ESCAPE_KEY = qr{ (?: ^\W ) | $ESCAPE_CHAR }x; -my @UNPRINTABLE = qw( - z x01 x02 x03 x04 x05 x06 a - x08 t n v f r x0e x0f - x10 x11 x12 x13 x14 x15 x16 x17 - x18 x19 x1a e x1c x1d x1e x1f -); +my @UNPRINTABLE; +$UNPRINTABLE[$_] = sprintf("x%02x", from_native($_)) for 0 .. ord(" ") - 1; +$UNPRINTABLE[ord "\0"] = 'z'; +$UNPRINTABLE[ord "\a"] = 'a'; +$UNPRINTABLE[ord "\t"] = 't'; +$UNPRINTABLE[ord "\n"] = 'n'; +$UNPRINTABLE[ord "\cK"] = 'v'; +$UNPRINTABLE[ord "\f"] = 'f'; +$UNPRINTABLE[ord "\r"] = 'r'; +$UNPRINTABLE[ord "\e"] = 'e'; # new() implementation supplied by TAP::Object @@ -76,7 +85,7 @@ sub _enc_scalar { if ( $val =~ /$rule/ ) { $val =~ s/\\/\\\\/g; $val =~ s/"/\\"/g; - $val =~ s/ ( [\x00-\x1f] ) / '\\' . $UNPRINTABLE[ ord($1) ] /gex; + $val =~ s/ ( [[:cntrl:]] ) / '\\' . $UNPRINTABLE[ ord($1) ] /gex; return qq{"$val"}; } @@ -146,7 +155,7 @@ TAP::Parser::YAMLish::Writer - Write YAMLish data =head1 VERSION -Version 3.43 +Version 3.44 =head1 SYNOPSIS |