r39895 - in /branches/upstream/libdevel-declare-perl/current: Changes Declare.xs META.yml Makefile.PL lib/Devel/Declare.pm stolen_chunk_of_toke.c t/lines.t

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Tue Jul 14 14:24:21 UTC 2009


Author: jawnsy-guest
Date: Tue Jul 14 14:24:13 2009
New Revision: 39895

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=39895
Log:
[svn-upgrade] Integrating new upstream version, libdevel-declare-perl (0.005007)

Modified:
    branches/upstream/libdevel-declare-perl/current/Changes
    branches/upstream/libdevel-declare-perl/current/Declare.xs
    branches/upstream/libdevel-declare-perl/current/META.yml
    branches/upstream/libdevel-declare-perl/current/Makefile.PL
    branches/upstream/libdevel-declare-perl/current/lib/Devel/Declare.pm
    branches/upstream/libdevel-declare-perl/current/stolen_chunk_of_toke.c
    branches/upstream/libdevel-declare-perl/current/t/lines.t

Modified: branches/upstream/libdevel-declare-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-declare-perl/current/Changes?rev=39895&op=diff
==============================================================================
--- branches/upstream/libdevel-declare-perl/current/Changes (original)
+++ branches/upstream/libdevel-declare-perl/current/Changes Tue Jul 14 14:24:13 2009
@@ -1,17 +1,20 @@
 Changes for Devel-Declare
 
-0.005006
+0.005007 - 13 Jul 2009
+  - Fix line numbers not being updated from skipspace calls
+
+0.005006 - 16 Jun 2009
   - Fix compilation on 5.8 perls.
 
-0.005005
+0.005005 - 05 Jun 2009
   - Improve compatibility with MAD-enabled perls
     (Reini Urban, Closes RT#45779).
 
-0.005004
+0.005004 - 03 Jun 2009
   - Don't redefine MEM_WRAP_CHECK_ if it's already defined, getting rid of
     compilation errors on some perls (Maik Fischer).
 
-0.005003
+0.005003 - 24 May 2009
   - Failing tests for line number issues (Ash Berlin).
   - Add strip_names_and_args (Cory Watson).
   - Various pod fixes (Yanick Champoux, Florian Ragwitz).

Modified: branches/upstream/libdevel-declare-perl/current/Declare.xs
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-declare-perl/current/Declare.xs?rev=39895&op=diff
==============================================================================
--- branches/upstream/libdevel-declare-perl/current/Declare.xs (original)
+++ branches/upstream/libdevel-declare-perl/current/Declare.xs Tue Jul 14 14:24:13 2009
@@ -117,10 +117,11 @@
   unsigned int new_len = strlen(new_value);
 
   if (SvLEN(PL_linestr) < new_len) {
-    croak("forced to realloc PL_linestr for line %s, bailing out before we crash harder", SvPVX(PL_linestr));
-  }
-
-  SvGROW(PL_linestr, new_len);
+    croak("PL_linestr not long enough, was Devel::Declare loaded soon enough in %s",
+      CopFILE(&PL_compiling)
+    );
+  }
+
 
   memcpy(SvPVX(PL_linestr), new_value, new_len+1);
 

Modified: branches/upstream/libdevel-declare-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-declare-perl/current/META.yml?rev=39895&op=diff
==============================================================================
--- branches/upstream/libdevel-declare-perl/current/META.yml (original)
+++ branches/upstream/libdevel-declare-perl/current/META.yml Tue Jul 14 14:24:13 2009
@@ -10,7 +10,7 @@
   ExtUtils::Depends: 0
   ExtUtils::MakeMaker: 6.42
 distribution_type: module
-generated_by: 'Module::Install version 0.91'
+generated_by: 'Module::Install version 0.910'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -28,4 +28,4 @@
   perl: 5.8.1
 resources:
   license: http://dev.perl.org/licenses/
-version: 0.005006
+version: 0.005007

Modified: branches/upstream/libdevel-declare-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-declare-perl/current/Makefile.PL?rev=39895&op=diff
==============================================================================
--- branches/upstream/libdevel-declare-perl/current/Makefile.PL (original)
+++ branches/upstream/libdevel-declare-perl/current/Makefile.PL Tue Jul 14 14:24:13 2009
@@ -1,4 +1,4 @@
-use inc::Module::Install 0.67;
+use inc::Module::Install 0.91;
 
 use 5.008001;
 
@@ -25,7 +25,7 @@
 
 WriteMakefile(
   dist => {
-    PREOP => 'pod2text lib/Devel/Declare.pm >$(DISTVNAME)/README'
+    PREOP => 'pod2text lib/Devel/Declare.pm >README'
   },
   $pkg->get_makefile_vars,
 );

Modified: branches/upstream/libdevel-declare-perl/current/lib/Devel/Declare.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-declare-perl/current/lib/Devel/Declare.pm?rev=39895&op=diff
==============================================================================
--- branches/upstream/libdevel-declare-perl/current/lib/Devel/Declare.pm (original)
+++ branches/upstream/libdevel-declare-perl/current/lib/Devel/Declare.pm Tue Jul 14 14:24:13 2009
@@ -4,7 +4,7 @@
 use warnings;
 use 5.008001;
 
-our $VERSION = '0.005006';
+our $VERSION = '0.005007';
 
 use constant DECLARE_NAME => 1;
 use constant DECLARE_PROTO => 2;

Modified: branches/upstream/libdevel-declare-perl/current/stolen_chunk_of_toke.c
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-declare-perl/current/stolen_chunk_of_toke.c?rev=39895&op=diff
==============================================================================
--- branches/upstream/libdevel-declare-perl/current/stolen_chunk_of_toke.c (original)
+++ branches/upstream/libdevel-declare-perl/current/stolen_chunk_of_toke.c Tue Jul 14 14:24:13 2009
@@ -63,6 +63,20 @@
 #else
 #define SPACE_OR_TAB(c) ((c)==' '||(c)=='\t')
 #endif
+
+/*
+ * Normally, during compile time, PL_curcop == &PL_compiling is true. However,
+ * Devel::Declare makes the interpreter call back to perl during compile time,
+ * which temporarily enters runtime. Then perl space calls various functions
+ * from this file, which are designed to work during compile time. They all
+ * happen to operate on PL_curcop, not PL_compiling. That doesn't make a
+ * difference in the core, but it does for Devel::Declare, which operates at
+ * runtime, but still wants to mangle the things that are about to be compiled.
+ * That's why we define our own PL_curcop and make it point to PL_compiling
+ * here.
+ */
+#undef PL_curcop
+#define PL_curcop (&PL_compiling)
 
 #define CLINE (PL_copline = (CopLINE(PL_curcop) < PL_copline ? CopLINE(PL_curcop) : PL_copline))
 

Modified: branches/upstream/libdevel-declare-perl/current/t/lines.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libdevel-declare-perl/current/t/lines.t?rev=39895&op=diff
==============================================================================
--- branches/upstream/libdevel-declare-perl/current/t/lines.t (original)
+++ branches/upstream/libdevel-declare-perl/current/t/lines.t Tue Jul 14 14:24:13 2009
@@ -47,9 +47,6 @@
 #line 48
 is(@lines, 2, "2 line numbers recorded");
 is $lines[0], 100, "fun starts on line 100";
-{
-  local $TODO = "line numbers aren't quite right yet, sometimes";
-  is $lines[1], 101, "fun stops on line 101";
-  is $line, 102, "next statement on line 102";
-  is $line2, 103, "next statement on line 103";
-}
+is $lines[1], 101, "fun stops on line 101";
+is $line, 102, "next statement on line 102";
+is $line2, 103, "next statement on line 103";




More information about the Pkg-perl-cvs-commits mailing list