Skip Menu |

This queue is for tickets about the YAML-Tiny CPAN distribution.

Report information
The Basics
Id: 55934
Status: open
Priority: 0/
Queue: YAML-Tiny

People
Owner: Nobody in particular
Requestors: DDUMONT [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.41
Fixed in: (no value)



Subject: Parsing of multi-line block with chomping indicator not correct
Hello The following block: --- description: >- MAILFROM is the forged sender email address you want to use in email submitted to the popularity-contest. If your MTA is misconfigured or impossible to configure correctly, and it always generates invalid From: and/or Sender: lines, you can force different results by setting MAILFROM here. Should be parsed as 2 paragraphs. i.e. 2 long lines separated by 2 \n Instead, YAML::Tiny parses as one single line, which is not correct. Note that YAML parser returns the correct result. Feel free to contact me if you need more details. All the best
On Thu Mar 25 08:25:30 2010, DDUMONT wrote: Show quoted text
> Hello > > The following block: > --- > description: >- > MAILFROM is the forged sender email address you want to use > in email submitted to the popularity-contest. > > > If your MTA is misconfigured or > impossible to configure correctly, and it always generates > invalid From: and/or Sender: lines, you can force different > results by setting MAILFROM here. > > Should be parsed as 2 paragraphs. i.e. 2 long lines separated by 2 \n > > Instead, YAML::Tiny parses as one single line, which is not correct. > Note that YAML parser returns the correct result. > > Feel free to contact me if you need more details. > > All the best > > > > >
Confirmed. Running 55934-chomping.pl (attached) on mailfrom.yaml (also attached) generates the following: ######### $VAR1 = bless( [ { 'description' => 'MAILFROM is the forged sender email address you want to use in email submitted to the popularity-contest. If your MTA is misconfigured or impossible to configure correctly, and it always generates invalid From: and/or Sender: lines, you can force different results by setting MAILFROM here. ' } ], 'YAML::Tiny' ); ##########
Subject: 55934-chomping.pl
#!/usr/local/bin/perl use strict; use warnings; use 5.010_001; use Data::Dumper;$Data::Dumper::Indent=1; use Carp; use YAML::Tiny; my $file = q{mailfrom.yaml}; my $y = YAML::Tiny->new->read( $file ); say Dumper $y;
Subject: mailfrom.yaml
--- description: >- MAILFROM is the forged sender email address you want to use in email submitted to the popularity-contest. If your MTA is misconfigured or impossible to configure correctly, and it always generates invalid From: and/or Sender: lines, you can force different results by setting MAILFROM here.