r42068 - in /trunk/libdevel-declare-perl: ./ debian/ debian/patches/ lib/Devel/ t/
ansgar-guest at users.alioth.debian.org
ansgar-guest at users.alioth.debian.org
Tue Aug 18 17:11:22 UTC 2009
Author: ansgar-guest
Date: Tue Aug 18 17:11:16 2009
New Revision: 42068
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=42068
Log:
* New upstream release
* Add patch to use old version of Test::More to work around #541342
+ new patch: use-old-test-simple.patch
+ add quilt framework and README.source
* debian/control: make build-dep on perl unversioned (version in oldstable
is recent enough)
* Bump Standards-Version to 3.8.3
* Add myself to Uploaders
Added:
trunk/libdevel-declare-perl/debian/README.source
trunk/libdevel-declare-perl/debian/patches/
trunk/libdevel-declare-perl/debian/patches/series
trunk/libdevel-declare-perl/debian/patches/use-old-test-simple.patch
trunk/libdevel-declare-perl/t/no-bareword.t
- copied unchanged from r42067, branches/upstream/libdevel-declare-perl/current/t/no-bareword.t
Modified:
trunk/libdevel-declare-perl/Changes
trunk/libdevel-declare-perl/Declare.xs
trunk/libdevel-declare-perl/MANIFEST
trunk/libdevel-declare-perl/META.yml
trunk/libdevel-declare-perl/Makefile.PL
trunk/libdevel-declare-perl/debian/changelog
trunk/libdevel-declare-perl/debian/control
trunk/libdevel-declare-perl/debian/rules
trunk/libdevel-declare-perl/lib/Devel/Declare.pm
trunk/libdevel-declare-perl/stolen_chunk_of_toke.c
Modified: trunk/libdevel-declare-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-declare-perl/Changes?rev=42068&op=diff
==============================================================================
--- trunk/libdevel-declare-perl/Changes (original)
+++ trunk/libdevel-declare-perl/Changes Tue Aug 18 17:11:16 2009
@@ -1,4 +1,10 @@
Changes for Devel-Declare
+
+0.005011 - 14 Aug 2009
+ - Add tests for not interpreting various things as barewords when they
+ aren't.
+ - Depend on a Test::More with done_testing support.
+ - Don't invoke the const callback for a keyword followed by a fat comma.
0.005010 - 11 Aug 2009
- Don't invoke the linestr callback if we found a keyword and the bufptr
Modified: trunk/libdevel-declare-perl/Declare.xs
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-declare-perl/Declare.xs?rev=42068&op=diff
==============================================================================
--- trunk/libdevel-declare-perl/Declare.xs (original)
+++ trunk/libdevel-declare-perl/Declare.xs Tue Aug 18 17:11:16 2009
@@ -220,7 +220,7 @@
int dd_toke_skipspace(pTHX_ int offset) {
char* base_s = SvPVX(PL_linestr) + offset;
- char* s = skipspace(base_s);
+ char* s = skipspace_force(base_s);
return s - base_s;
}
@@ -381,8 +381,34 @@
break;
}
- if (strnEQ (PL_bufptr, "->", 2)) {
- return o;
+ if (strnEQ(PL_bufptr, "->", 2)) {
+ return o;
+ }
+
+ {
+ char buf[256];
+ STRLEN len;
+ char *s = PL_bufptr;
+ STRLEN old_offset = PL_bufptr - SvPVX(PL_linestr);
+
+ s = scan_word(s, buf, sizeof buf, FALSE, &len);
+ if (strnEQ(buf, name, len)) {
+ char *d;
+ SV *inject = newSVpvn(SvPVX(PL_linestr), PL_bufptr - SvPVX(PL_linestr));
+ sv_catpvn(inject, buf, len);
+
+ d = peekspace(s);
+ sv_catpvn(inject, s, d - s);
+
+ if ((PL_bufend - d) >= 2 && strnEQ(d, "=>", 2)) {
+ return o;
+ }
+
+ sv_catpv(inject, d);
+ dd_set_linestr(aTHX_ SvPV_nolen(inject));
+ PL_bufptr = SvPVX(PL_linestr) + old_offset;
+ SvREFCNT_dec (inject);
+ }
}
dd_linestr_callback(aTHX_ "const", name);
Modified: trunk/libdevel-declare-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-declare-perl/MANIFEST?rev=42068&op=diff
==============================================================================
--- trunk/libdevel-declare-perl/MANIFEST (original)
+++ trunk/libdevel-declare-perl/MANIFEST Tue Aug 18 17:11:16 2009
@@ -29,6 +29,7 @@
t/method.t
t/multiline-proto.t
t/new.t
+t/no-bareword.t
t/pack.t
t/padstuff.t
t/proto.t
Modified: trunk/libdevel-declare-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-declare-perl/META.yml?rev=42068&op=diff
==============================================================================
--- trunk/libdevel-declare-perl/META.yml (original)
+++ trunk/libdevel-declare-perl/META.yml Tue Aug 18 17:11:16 2009
@@ -5,6 +5,7 @@
build_requires:
B::Hooks::OP::Check: 0.18
ExtUtils::MakeMaker: 6.42
+ Test::More: 0.88
configure_requires:
B::Hooks::OP::Check: 0.18
ExtUtils::Depends: 0.302
@@ -29,4 +30,4 @@
resources:
license: http://dev.perl.org/licenses/
repository: git://github.com/rafl/devel-declare.git
-version: 0.005010
+version: 0.005011
Modified: trunk/libdevel-declare-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-declare-perl/Makefile.PL?rev=42068&op=diff
==============================================================================
--- trunk/libdevel-declare-perl/Makefile.PL (original)
+++ trunk/libdevel-declare-perl/Makefile.PL Tue Aug 18 17:11:16 2009
@@ -20,6 +20,8 @@
# minimum version that depends on ExtUtils::Depends 0.302
configure_requires 'B::Hooks::OP::Check' => '0.18';
+test_requires 'Test::More' => '0.88';
+
repository 'git://github.com/rafl/devel-declare.git';
postamble(<<'EOM');
Added: trunk/libdevel-declare-perl/debian/README.source
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-declare-perl/debian/README.source?rev=42068&op=file
==============================================================================
--- trunk/libdevel-declare-perl/debian/README.source (added)
+++ trunk/libdevel-declare-perl/debian/README.source Tue Aug 18 17:11:16 2009
@@ -1,0 +1,6 @@
+This package uses quilt to manage all modifications to the upstream
+source. Changes are stored in the source package as diffs in
+debian/patches and applied during the build.
+
+See /usr/share/doc/quilt/README.source for a detailed explanation.
+
Modified: trunk/libdevel-declare-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-declare-perl/debian/changelog?rev=42068&op=diff
==============================================================================
--- trunk/libdevel-declare-perl/debian/changelog (original)
+++ trunk/libdevel-declare-perl/debian/changelog Tue Aug 18 17:11:16 2009
@@ -1,3 +1,16 @@
+libdevel-declare-perl (0.005011-1) unstable; urgency=low
+
+ * New upstream release
+ * Add patch to use old version of Test::More to work around #541342
+ + new patch: use-old-test-simple.patch
+ + add quilt framework and README.source
+ * debian/control: make build-dep on perl unversioned (version in oldstable
+ is recent enough)
+ * Bump Standards-Version to 3.8.3
+ * Add myself to Uploaders
+
+ -- Ansgar Burchardt <ansgar at 43-1.org> Tue, 18 Aug 2009 19:11:01 +0200
+
libdevel-declare-perl (0.005010-1) unstable; urgency=low
[ Jonathan Yu ]
Modified: trunk/libdevel-declare-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-declare-perl/debian/control?rev=42068&op=diff
==============================================================================
--- trunk/libdevel-declare-perl/debian/control (original)
+++ trunk/libdevel-declare-perl/debian/control Tue Aug 18 17:11:16 2009
@@ -1,12 +1,14 @@
Source: libdevel-declare-perl
Section: perl
Priority: optional
-Build-Depends: perl (>= 5.8.1), debhelper (>= 7), libextutils-depends-perl,
- libb-hooks-op-check-perl (>= 0.17), libb-hooks-endofscope-perl (>= 0.05),
- libsub-name-perl
+Build-Depends: perl, debhelper (>= 7.0.8), quilt (>= 0.46-7),
+ libextutils-depends-perl, libb-hooks-op-check-perl (>= 0.17),
+ libb-hooks-endofscope-perl (>= 0.05), libsub-name-perl
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
-Uploaders: Jonathan Yu <frequency at cpan.org>, Ryan Niebur <ryanryan52 at gmail.com>
-Standards-Version: 3.8.2
+Uploaders: Jonathan Yu <frequency at cpan.org>,
+ Ryan Niebur <ryanryan52 at gmail.com>,
+ Ansgar Burchardt <ansgar at 43-1.org>
+Standards-Version: 3.8.3
Homepage: http://search.cpan.org/dist/Devel-Declare/
Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libdevel-declare-perl/
Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libdevel-declare-perl/
Added: trunk/libdevel-declare-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-declare-perl/debian/patches/series?rev=42068&op=file
==============================================================================
--- trunk/libdevel-declare-perl/debian/patches/series (added)
+++ trunk/libdevel-declare-perl/debian/patches/series Tue Aug 18 17:11:16 2009
@@ -1,0 +1,1 @@
+use-old-test-simple.patch
Added: trunk/libdevel-declare-perl/debian/patches/use-old-test-simple.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-declare-perl/debian/patches/use-old-test-simple.patch?rev=42068&op=file
==============================================================================
--- trunk/libdevel-declare-perl/debian/patches/use-old-test-simple.patch (added)
+++ trunk/libdevel-declare-perl/debian/patches/use-old-test-simple.patch Tue Aug 18 17:11:16 2009
@@ -1,0 +1,46 @@
+From: Ansgar Burchardt <ansgar at 43-1.org>
+Date: Tue, 18 Aug 2009 19:00:59 +0200
+Subject: Use old Test::More
+
+Use an older version of Test::More to avoid a bug in sbuild.
+This patch can be droppen once [1] is fixed.
+
+[2] http://bugs.debian.org/541342
+--- libdevel-declare-perl.orig/META.yml
++++ libdevel-declare-perl/META.yml
+@@ -5,7 +5,7 @@
+ build_requires:
+ B::Hooks::OP::Check: 0.18
+ ExtUtils::MakeMaker: 6.42
+- Test::More: 0.88
++ Test::More: 0
+ configure_requires:
+ B::Hooks::OP::Check: 0.18
+ ExtUtils::Depends: 0.302
+--- libdevel-declare-perl.orig/Makefile.PL
++++ libdevel-declare-perl/Makefile.PL
+@@ -20,7 +20,7 @@
+ # minimum version that depends on ExtUtils::Depends 0.302
+ configure_requires 'B::Hooks::OP::Check' => '0.18';
+
+-test_requires 'Test::More' => '0.88';
++test_requires 'Test::More';
+
+ repository 'git://github.com/rafl/devel-declare.git';
+
+--- libdevel-declare-perl.orig/t/no-bareword.t
++++ libdevel-declare-perl/t/no-bareword.t
+@@ -1,6 +1,6 @@
+ use strict;
+ use warnings;
+-use Test::More;
++use Test::More tests => 3;
+
+ our $i;
+ BEGIN { $i = 0 };
+@@ -30,5 +30,3 @@
+ BEGIN { is($i, 0) }
+
+ is_deeply(\@foo, ['method', '123']);
+-
+-done_testing;
Modified: trunk/libdevel-declare-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-declare-perl/debian/rules?rev=42068&op=diff
==============================================================================
--- trunk/libdevel-declare-perl/debian/rules (original)
+++ trunk/libdevel-declare-perl/debian/rules Tue Aug 18 17:11:16 2009
@@ -1,4 +1,4 @@
#!/usr/bin/make -f
%:
- dh $@
+ dh --with quilt $@
Modified: trunk/libdevel-declare-perl/lib/Devel/Declare.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-declare-perl/lib/Devel/Declare.pm?rev=42068&op=diff
==============================================================================
--- trunk/libdevel-declare-perl/lib/Devel/Declare.pm (original)
+++ trunk/libdevel-declare-perl/lib/Devel/Declare.pm Tue Aug 18 17:11:16 2009
@@ -4,7 +4,7 @@
use warnings;
use 5.008001;
-our $VERSION = '0.005010';
+our $VERSION = '0.005011';
use constant DECLARE_NAME => 1;
use constant DECLARE_PROTO => 2;
Modified: trunk/libdevel-declare-perl/stolen_chunk_of_toke.c
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdevel-declare-perl/stolen_chunk_of_toke.c?rev=42068&op=diff
==============================================================================
--- trunk/libdevel-declare-perl/stolen_chunk_of_toke.c (original)
+++ trunk/libdevel-declare-perl/stolen_chunk_of_toke.c Tue Aug 18 17:11:16 2009
@@ -19,7 +19,9 @@
/* the following #defines are stolen from assorted headers, not toke.c (mst) */
-#define skipspace(a) S_skipspace(aTHX_ a)
+#define skipspace(a) S_skipspace(aTHX_ a, 0)
+#define peekspace(a) S_skipspace(aTHX_ a, 1)
+#define skipspace_force(a) S_skipspace(aTHX_ a, 2)
#define incline(a) S_incline(aTHX_ a)
#define filter_gets(a,b,c) S_filter_gets(aTHX_ a,b,c)
#define scan_str(a,b,c) S_scan_str(aTHX_ a,b,c)
@@ -27,7 +29,7 @@
#define scan_ident(a,b,c,d,e) S_scan_ident(aTHX_ a,b,c,d,e)
STATIC void S_incline(pTHX_ char *s);
-STATIC char* S_skipspace(pTHX_ char *s);
+STATIC char* S_skipspace(pTHX_ char *s, int incline);
STATIC char * S_filter_gets(pTHX_ SV *sv, PerlIO *fp, STRLEN append);
STATIC char* S_scan_str(pTHX_ char *start, int keep_quoted, int keep_delims);
STATIC char* S_scan_word(pTHX_ char *s, char *dest, STRLEN destlen, int allow_package, STRLEN *slp);
@@ -270,7 +272,7 @@
*/
STATIC char *
-S_skipspace(pTHX_ register char *s)
+S_skipspace(pTHX_ register char *s, int incline)
{
if (PL_lex_formbrack && PL_lex_brackets <= PL_lex_formbrack) {
while (s < PL_bufend && SPACE_OR_TAB(*s))
@@ -282,7 +284,7 @@
SSize_t oldprevlen, oldoldprevlen;
SSize_t oldloplen = 0, oldunilen = 0;
while (s < PL_bufend && isSPACE(*s)) {
- if (*s++ == '\n' && PL_in_eval && !PL_rsfp)
+ if (*s++ == '\n' && ((incline == 2) || PL_in_eval && !PL_rsfp && !incline))
incline(s);
}
@@ -292,11 +294,19 @@
s++;
if (s < PL_bufend) {
s++;
- if (PL_in_eval && !PL_rsfp) {
+ if (PL_in_eval && !PL_rsfp && !incline) {
incline(s);
continue;
}
}
+ }
+
+ /* also skip leading whitespace on the beginning of a line before deciding
+ * whether or not to recharge the linestr. --rafl
+ */
+ while (s < PL_bufend && isSPACE(*s)) {
+ if (*s++ == '\n' && PL_in_eval && !PL_rsfp && !incline)
+ incline(s);
}
/* only continue to recharge the buffer if we're at the end
@@ -368,7 +378,8 @@
PL_last_uni = s + oldunilen;
if (PL_last_lop)
PL_last_lop = s + oldloplen;
- incline(s);
+ if (!incline)
+ incline(s);
/* debugger active and we're not compiling the debugger code,
* so store the line into the debugger's array of lines
More information about the Pkg-perl-cvs-commits
mailing list