Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
24,328 additions
and
1,353 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
use strict; | ||
use warnings; | ||
use Path::Tiny; | ||
use JSON::PS; | ||
|
||
my $root_path = path (__FILE__)->parent->parent; | ||
|
||
my $Data = []; | ||
|
||
my $path = $root_path->child ('local/psl-test.txt'); | ||
for (split /\x0D?\x0A/, $path->slurp_utf8) { | ||
if (m{^\s*checkPublicSuffix\s*\(("[^"]*"|'[^']*'|null)\s*,\s*("[^"]*"|'[^']*'|null)\s*\);\s*$}) { | ||
my $input = $1; | ||
my $output = $2; | ||
if ($input eq 'null') { | ||
$input = undef; | ||
} else { | ||
$input =~ s/^["']//; | ||
$input =~ s/["']$//; | ||
} | ||
if ($output eq 'null') { | ||
$output = undef; | ||
} else { | ||
$output =~ s/^["']//; | ||
$output =~ s/["']$//; | ||
} | ||
push @$Data, [$input, $output]; | ||
} | ||
} | ||
|
||
print perl2json_bytes_for_record $Data; | ||
|
||
## License: Public Domain. |
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
Oops, something went wrong.