diff options
author | wm4 <wm4@nowhere> | 2016-12-17 13:24:05 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-12-17 15:43:15 +0100 |
commit | ff9f5e06ff203c055d968087956026ef9204218b (patch) | |
tree | 883725191398913cc97bd441b7110bcf68237e28 /TOOLS/lib/Parse/Matroska/Utils.pm | |
parent | 2b8b17402ed59815019b309051b277ba4de82f3b (diff) | |
download | mpv-ff9f5e06ff203c055d968087956026ef9204218b.tar.bz2 mpv-ff9f5e06ff203c055d968087956026ef9204218b.tar.xz |
Revert "Port several python scripts to Perl"
This reverts commit fae73079310eef9dce9737f2e37ff4b80c8830ee.
Before the waf build system was used, we had a configure script written
in shell. To drop the build dependency on Python, someone rewrote the
Python scripts we had to Perl. Now the shell configure script is gone,
and it makes no sense to have a build dependency on both Perl and
Python.
This isn't just a straight revert. It adds the new Matroska EBML
elements to the old Python scripts, adjusts the waf build system, and of
course doesn't add anything back needed by the old build system.
It would be better if this used matroska.py/file2string.py directly by
importing them as modules, instead of calling them via "python". But for
now this is simpler.
Diffstat (limited to 'TOOLS/lib/Parse/Matroska/Utils.pm')
-rw-r--r-- | TOOLS/lib/Parse/Matroska/Utils.pm | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/TOOLS/lib/Parse/Matroska/Utils.pm b/TOOLS/lib/Parse/Matroska/Utils.pm deleted file mode 100644 index 127d626cb1..0000000000 --- a/TOOLS/lib/Parse/Matroska/Utils.pm +++ /dev/null @@ -1,37 +0,0 @@ -use strict; -use warnings; - -# ABSTRACT: internally-used helper functions -package Parse::Matroska::Utils; - -use Exporter; -our @ISA = qw{Exporter}; -our @EXPORT_OK = qw{uniq uncamelize}; - -=method uniq(@array) - -The same as L<List::MoreUtils/"uniq LIST">. -Included to avoid depending on it since it's -not a core module. - -=cut -sub uniq(@) { - my %seen; - return grep { !$seen{$_}++ } @_; -} - -=method uncamelize($string) - -Converts a "StringLikeTHIS" into a -"string_like_this". - -=cut -sub uncamelize($) { - local $_ = shift; - # lc followed by UC: lc_UC - s/(?<=[a-z])([A-Z])/_\L$1/g; - # UC followed by two lc: _UClclc - s/([A-Z])(?=[a-z]{2})/_\L$1/g; - # strip leading _ that the second regexp might add; lowercase all - s/^_//; lc -} |