From 6e56dce4194d7a4de56c0a9111020e19e5963bf2 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Mon, 29 Dec 2014 17:03:48 +0100 Subject: scripts: Rename and deprecate _g function with g_ The old function name was inconsistent with the other gettext family of short aliases which has already caused some code typos, and functions starting with underscore are considered by convention private in Perl. --- scripts/Dpkg/Compression/FileHandle.pm | 4 ++-- scripts/Dpkg/Compression/Process.pm | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'scripts/Dpkg/Compression') diff --git a/scripts/Dpkg/Compression/FileHandle.pm b/scripts/Dpkg/Compression/FileHandle.pm index e3a07a4da..d24d55b98 100644 --- a/scripts/Dpkg/Compression/FileHandle.pm +++ b/scripts/Dpkg/Compression/FileHandle.pm @@ -400,7 +400,7 @@ sub open_for_write { to_file => $self->get_filename(), %opts); } else { CORE::open($filehandle, '>', $self->get_filename) - or syserr(_g('cannot write %s'), $self->get_filename()); + or syserr(g_('cannot write %s'), $self->get_filename()); } *$self->{mode} = 'w'; *$self->{file} = $filehandle; @@ -419,7 +419,7 @@ sub open_for_read { *$self->{allow_sigpipe} = 1; } else { CORE::open($filehandle, '<', $self->get_filename) - or syserr(_g('cannot read %s'), $self->get_filename()); + or syserr(g_('cannot read %s'), $self->get_filename()); } *$self->{mode} = 'r'; *$self->{file} = $filehandle; diff --git a/scripts/Dpkg/Compression/Process.pm b/scripts/Dpkg/Compression/Process.pm index ff5c8f0fe..0927e817b 100644 --- a/scripts/Dpkg/Compression/Process.pm +++ b/scripts/Dpkg/Compression/Process.pm @@ -70,7 +70,7 @@ B). sub set_compression { my ($self, $method) = @_; - error(_g('%s is not a supported compression method'), $method) + error(g_('%s is not a supported compression method'), $method) unless compression_is_supported($method); $self->{compression} = $method; } @@ -85,7 +85,7 @@ B). sub set_compression_level { my ($self, $level) = @_; - error(_g('%s is not a compression level'), $level) + error(g_('%s is not a compression level'), $level) unless compression_is_valid_level($level); $self->{compression_level} = $level; } @@ -121,7 +121,7 @@ sub get_uncompress_cmdline { sub _sanity_check { my ($self, %opts) = @_; # Check for proper cleaning before new start - error(_g('Dpkg::Compression::Process can only start one subprocess at a time')) + error(g_('Dpkg::Compression::Process can only start one subprocess at a time')) if $self->{pid}; # Check options my $to = my $from = 0; -- cgit v1.2.3