From: Vincent Pit Date: Thu, 26 Feb 2009 14:10:10 +0000 (+0100) Subject: Be less chatty for handling the type in ->convert X-Git-Tag: v1.03~6 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FRegexp-Wildcards.git;a=commitdiff_plain;h=9c3834679ddb9a9abec641bd0c90c7f73f60b730 Be less chatty for handling the type in ->convert --- diff --git a/lib/Regexp/Wildcards.pm b/lib/Regexp/Wildcards.pm index ac0cec3..b70b593 100644 --- a/lib/Regexp/Wildcards.pm +++ b/lib/Regexp/Wildcards.pm @@ -404,12 +404,7 @@ It successively escapes all unprotected regexp special characters that doesn't h sub convert { my ($self, $wc, $type) = @_; _check_self $self; - my $config; - if (defined $type) { - $config = $self->_type($type); - } else { - $config = $self; - } + my $config = (defined $type) ? $self->_type($type) : $self; return unless defined $wc; my $do = $config->{do}; my $e = $config->{escape};