From: Junio C Hamano Date: Sat, 28 Apr 2007 06:27:42 GMT Subject: Re: [PATCH 1/4] Git.pm: config_boolean() -> config_bool() Message-ID: <7v7irxko81.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <20070427020601.22991.13792.stgit@rover> Petr Baudis writes: > This patch renames config_boolean() to config_bool() for consistency with > the commandline interface and because it is shorter but still obvious. ;-) > It also changes the return value from some obscure string to real Perl > boolean, allowing for clean user code. Doesn't this break send-email? > @@ -526,14 +528,16 @@ This currently wraps command('config') s > > =cut > > -sub config_boolean { > +sub config_bool { > my ($self, $var) = @_; > $self->repo_path() > or throw Error::Simple("not a repository"); > > try { > - return $self->command_oneline('config', '--bool', '--get', > + my $var = $self->command_oneline('config', '--bool', '--get', > $var); > + return undef unless defined $var; > + return $var eq 'true'; Did you mean to hide $var in the nested scope?