diff options
author | Guillem Jover <guillem@debian.org> | 2014-12-29 17:03:48 +0100 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2015-01-28 20:50:30 +0100 |
commit | 6e56dce4194d7a4de56c0a9111020e19e5963bf2 (patch) | |
tree | 1459afbc2f5e993b1069357291f622f3e0513e1f /scripts/Dpkg/Compression | |
parent | 08ce938d42f01ebe939f8a527f7b02ec017d3cc7 (diff) | |
download | dpkg-6e56dce4194d7a4de56c0a9111020e19e5963bf2.tar.gz |
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.
Diffstat (limited to 'scripts/Dpkg/Compression')
-rw-r--r-- | scripts/Dpkg/Compression/FileHandle.pm | 4 | ||||
-rw-r--r-- | scripts/Dpkg/Compression/Process.pm | 6 |
2 files changed, 5 insertions, 5 deletions
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<Dpkg::Compression>). 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<Dpkg::Compression>). 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; |