[lintian] 01/01: L::Util: Drop now unused unix_locale_split sub
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit 805f245e1f54d7e9156e93cb9c17e38786543fe6
Author: Niels Thykier <niels@thykier.net>
Date: Sat Jan 7 13:31:15 2017 +0000
L::Util: Drop now unused unix_locale_split sub
Signed-off-by: Niels Thykier <niels@thykier.net>
---
lib/Lintian/CheckScript.pm | 2 +-
lib/Lintian/Util.pm | 42 ------------------------------------------
2 files changed, 1 insertion(+), 43 deletions(-)
diff --git a/lib/Lintian/CheckScript.pm b/lib/Lintian/CheckScript.pm
index 90e2e5c..7fe4b4d 100644
--- a/lib/Lintian/CheckScript.pm
+++ b/lib/Lintian/CheckScript.pm
@@ -28,7 +28,7 @@ use parent 'Class::Accessor::Fast';
use Carp qw(croak);
use Lintian::Tag::Info ();
-use Lintian::Util qw(read_dpkg_control_utf8 unix_locale_split);
+use Lintian::Util qw(read_dpkg_control_utf8);
=head1 NAME
diff --git a/lib/Lintian/Util.pm b/lib/Lintian/Util.pm
index b8fa900..28be711 100644
--- a/lib/Lintian/Util.pm
+++ b/lib/Lintian/Util.pm
@@ -88,7 +88,6 @@ BEGIN {
load_state_cache
save_state_cache
find_backlog
- unix_locale_split
pipe_tee
untaint
$PKGNAME_REGEX
@@ -1496,47 +1495,6 @@ sub is_ancestor_of {
return 0;
}
-=item unix_locale_split(STR)
-
-Read STR as a locale code (e.g. en_GB.UTF-8) and return a list of
-locale codes ordered by preference. As an example, en_GB.UTF-8
-might return
-
- en_GB
- en
-
-Note encoding I<is ignored> as all Lintian files are always encoded in
-UTF-8.
-
-B<Special cases>: The "C" or "POSIX" locale returns the empty list.
-Other strings that do not match the expected format causes a trappable
-error.
-
-=cut
-
-sub unix_locale_split {
- my ($str) = @_;
- my ($locale_part, undef) = split(m/\./, $str, 2);
- my @parts;
- if ($locale_part eq 'POSIX' or $locale_part eq 'C') {
- return;
- }
-
- if ($locale_part !~ m/\A [a-z0-9-]+ (?: _ [a-z0-9-]+)* \Z/xsmi) {
- croak("Cannot parse $str as a locale string");
- }
-
- while ($locale_part ne '') {
- my $end;
- push(@parts, $locale_part);
- $end = rindex($locale_part, '_');
- last if ($end == -1);
- $locale_part = substr($locale_part, 0, $end);
- }
-
- return @parts;
-}
-
=item pipe_tee(INHANDLE, OUTHANDLES[, OPTS])
Read bytes from INHANDLE and copy them into all of the handles in the
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: