I have decided that's a better name. Not _f because, unlike
printf (where f is done first, and then print), here the _ is done
first and then f.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
my ($dctrl,$field) = @_;
my $v = $dctrl->{$field};
return $v if defined $v;
my ($dctrl,$field) = @_;
my $v = $dctrl->{$field};
return $v if defined $v;
- fail ___ "missing field %s in %s", $field, $dctrl->get_option('name');
+ fail f_ "missing field %s in %s", $field, $dctrl->get_option('name');
}
sub parsechangelog_loop ($$$) {
}
sub parsechangelog_loop ($$$) {
# This module provides
# __ a function which is an alias for gettext
# This module provides
# __ a function which is an alias for gettext
-# ___ sprintf wrapper that gettexts the format
+# f_ sprintf wrapper that gettexts the format
#
# In perl the sub `_' is a `superglobal', which means there
# is only one of it in the whole program and every reference
#
# In perl the sub `_' is a `superglobal', which means there
# is only one of it in the whole program and every reference
BEGIN {
use Exporter;
@ISA = qw(Exporter);
BEGIN {
use Exporter;
@ISA = qw(Exporter);
-sub ___ { my $f = shift @_; sprintf +(gettext $f), @_; }
+sub f_ { my $f = shift @_; sprintf +(gettext $f), @_; }
sub canonicalise_suite_madison {
# madison canonicalises for us
my @r = madison_get_parse(@_);
sub canonicalise_suite_madison {
# madison canonicalises for us
my @r = madison_get_parse(@_);
"unable to canonicalise suite using package %s".
" which does not appear to exist in suite %s;".
" --existing-package may help",
"unable to canonicalise suite using package %s".
" which does not appear to exist in suite %s;".
" --existing-package may help",
$cmdfn =~ y/-/_/;
$cmdfn = ${*::}{"cmd_$cmdfn"};
$cmdfn =~ y/-/_/;
$cmdfn = ${*::}{"cmd_$cmdfn"};
- $cmdfn or badusage ___ "unknown git-debrebase sub-operation %s", $cmd;
+ $cmdfn or badusage f_ "unknown git-debrebase sub-operation %s", $cmd;
%.mo: %.po
$S msgfmt -o $@ $<
%.mo: %.po
$S msgfmt -o $@ $<
-XGETTEXT_OPTS += -Lperl -k__ -k___
+XGETTEXT_OPTS += -Lperl -k__ -kf_
XGETTEXT_OPTS += --from-code=UTF-8
XGETTEXT_OPTS += --package-name=dgit --package-version=ongoing
# The --package-* avoids this error from make check's `msgfmt -c'
XGETTEXT_OPTS += --from-code=UTF-8
XGETTEXT_OPTS += --package-name=dgit --package-version=ongoing
# The --package-* avoids this error from make check's `msgfmt -c'