/gist:cff4c17fcc6d7bd2ece3 Secret
Created
June 10, 2015 15:06
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub combi (*%attr) | |
{ | |
if %attr<sep_char> eq %attr<quote_char> || %attr<sep_char> eq %attr<escape_char> { | |
say "INI - separator is equal to quote- or escape sequence" ~~ m{separator}; | |
} | |
if %attr<allow_whitespace> and %attr<escape_char> ~~ m/^[ \t]/ { | |
} | |
} | |
my @special = ('"', "'", ",", ";", "\t", "\\", "~"); | |
for ( False, True ) -> $aw { | |
for ( False, True ) -> $aq { | |
for ( @special ) -> $qc { | |
for ( @special, "+" ) -> $ec { | |
for ( @special, "\0" ) -> $sc { | |
combi( | |
sep_char => $sc, | |
quote_char => $qc, | |
escape_char => $ec, | |
allow_whitespace => $aw, | |
); | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment