Context::Simple::inject_if_block returns true value on block
Ash Berlin [Sun, 18 Jan 2009 19:47:32 +0000 (19:47 +0000)]
Changes
lib/Devel/Declare/Context/Simple.pm

diff --git a/Changes b/Changes
index 68513b1..5f1c049 100644 (file)
--- 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.
index afbcaf4..52dd70d 100644 (file)
@@ -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 {