From: Ash Berlin Date: Sun, 18 Jan 2009 19:47:32 +0000 (+0000) Subject: Context::Simple::inject_if_block returns true value on block X-Git-Tag: 0.005000~20 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=712c5dd1f3eae8fbcd01d58aee7e981ff54a14f6;p=p5sagit%2FDevel-Declare.git Context::Simple::inject_if_block returns true value on block --- diff --git a/Changes b/Changes index 68513b1..5f1c049 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ Changes for Devel-Declare + - Context::Simple::inject_if_block now returns true if start of block was + found + 0.003004 - Make magic work within string evals on 5.10 if the hints hash is used. - Bind S_scan_ident to perl. It allows scanning for simple identifiers. diff --git a/lib/Devel/Declare/Context/Simple.pm b/lib/Devel/Declare/Context/Simple.pm index afbcaf4..52dd70d 100644 --- a/lib/Devel/Declare/Context/Simple.pm +++ b/lib/Devel/Declare/Context/Simple.pm @@ -131,7 +131,9 @@ sub inject_if_block { substr($linestr, $self->offset + 1, 0) = $inject; substr($linestr, $self->offset, 0) = $before; $self->set_linestr($linestr); + return 1; } + return 0; } sub scope_injector_call {