This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch master
in repository libmoo-perl.

commit dc80bf7eeeba0b67be842918985b5d68301ca2c9
Author: Graham Knop <ha...@haarg.org>
Date:   Tue Jun 28 12:47:29 2016 -0400

    more correct inline module code for 5.6
---
 t/lib/InlineModule.pm | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/t/lib/InlineModule.pm b/t/lib/InlineModule.pm
index 8802a5a..388b21f 100644
--- a/t/lib/InlineModule.pm
+++ b/t/lib/InlineModule.pm
@@ -36,12 +36,15 @@ sub inc_module {
     return $fh;
   }
   else {
-    return sub {
-      return 0 unless length $code;
-      $code =~ s/^([^\n]*\n?)//;
-      $_ = $1;
+    my $pos = 0;
+    my $last = length $code;
+    return (sub {
+      return 0 if $pos == $last;
+      my $next = (1 + index $code, "\n", $pos) || $last;
+      $_ .= substr $code, $pos, $next - $pos;
+      $pos = $next;
       return 1;
-    };
+    });
   }
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/libmoo-perl.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to