[libtype-tiny-perl] 03/04: neated up Type::Tiny's use of Sub::Quote::inlinify
Jonas Smedegaard
js at moszumanska.debian.org
Wed Apr 30 14:24:19 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to tag 0.043_01
in repository libtype-tiny-perl.
commit 1975541440f159a44af5ce2b7c646c437733cf7a
Author: Toby Inkster <mail at tobyinkster.co.uk>
Date: Sat Apr 5 11:58:01 2014 +0100
neated up Type::Tiny's use of Sub::Quote::inlinify
---
lib/Type/Tiny.pm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/Type/Tiny.pm b/lib/Type/Tiny.pm
index a3dcad8..9103c86 100644
--- a/lib/Type/Tiny.pm
+++ b/lib/Type/Tiny.pm
@@ -138,8 +138,10 @@ sub new
$params{inlined} = sub {
my ($self, $var) = @_;
my $code = Sub::Quote::inlinify(
- $var eq q($_) ? $perlstring : "local \$_ = $var; $perlstring",
+ $perlstring,
$var,
+ $var eq q($_) ? '' : "local \$_ = $var;",
+ 1,
);
$code = sprintf('%s and %s', $self->parent->inline_check($var), $code) if $self->has_parent;
return $code;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libtype-tiny-perl.git
More information about the Pkg-perl-cvs-commits
mailing list