Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to recognize keys ending with : #26

Open
Tux opened this issue Mar 10, 2014 · 0 comments
Open

Fail to recognize keys ending with : #26

Tux opened this issue Mar 10, 2014 · 0 comments

Comments

@Tux
Copy link

Tux commented Mar 10, 2014

$ 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant