Skip to content

Fail to recognize keys ending with : #26

@Tux

Description

@Tux
$ cat  /tmp/Test-Database-merijn/CSV/mapping.yml

---
dbi:CSV::
   /pro/3gl/CPAN/DBI-Test-git/sandbox/tim: tdd_csv_merijn_0
$

PASSs with YAML, YAML::XS, and YAML::Syck, but FAILs with YAML::Tiny

YAML::Tiny failed to classify line 'dbi:CSV::' at …

If I dig, I come to the conclusion that this line is too restrictive:

my $re_capture_unquoted_key  = qr/([^:]+(?::+\S[^:]*)*)(?=\s*\:(?:\s+|$))/;

if I change that to

my $re_capture_unquoted_key  = qr/([^:]+(?::+\S(?:[^:]*|.*?(?=:)))*)(?=\s*\:(?:\s+|$))/;

YAML::Tiny also passes and its test suite also still passes, but I am by far a YAML expert and leave that conclusion to the experts

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions