Skip Menu |
 

This queue is for tickets about the Catalyst-Devel CPAN distribution.

Report information
The Basics
Id: 45253
Status: new
Priority: 0/
Queue: Catalyst-Devel

People
Owner: Nobody in particular
Requestors: daxim [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.11
Fixed in: (no value)

Attachments
0001--perl-49472-Attributes-Unkown-Error.patch



Subject: lower barriers for »compile a patched version for Catalyst development«
Download (untitled) / with headers
text/plain 971b
Makefile.PL says to me: # You are using perl 5.10.0 with the "Unknown error" bug. [...] # For more information see: # # * http://rt.perl.org/rt3/Public/Bug/Display.html?id=49472 # # It is highly recommended that you [...] # compile a patched version for Catalyst development. That link is unhelpful toward that goal. There's a lot of inessential waffling, and I have no idea what »change 33265« is, as is it not hyperlinked. Turns out, that change is really <http://github.com/github/perl/commit/ca4cfd28534303b82a216cfe83a1c80cbc3b9dc5>, but even from that site the changeset is not available in a patch format. I have extracted the changeset from git and attached it. My suggestion is to ship it with the distro or put it under MRAMBERG/patches or something, whatever is most convenient for the end-user, and then adapt the wording of Makefile.PL. Barebone instructions for applying: $ cd src/perl-5.10.0 $ git apply 0001--perl-49472-Attributes-Unkown-Error.patch
Subject: 0001--perl-49472-Attributes-Unkown-Error.patch
From ca4cfd28534303b82a216cfe83a1c80cbc3b9dc5 Mon Sep 17 00:00:00 2001 From: Dave Mitchell <davem@fdisolutions.com> Date: Sat, 9 Feb 2008 14:56:23 +0000 Subject: [PATCH 0001/2129] [perl #49472] Attributes + Unkown Error An errored attribute sub still processes the attributes, which require's attribute.pm, so make sure the error state is passed to the new require p4raw-id: //depot/perl@33265 --- t/comp/require.t | 16 +++++++++++++++- toke.c | 1 + 2 files changed, 16 insertions(+), 1 deletions(-) diff --git a/t/comp/require.t b/t/comp/require.t index af5e4b2..0746b3b 100755 --- a/t/comp/require.t +++ b/t/comp/require.t @@ -15,7 +15,7 @@ krunch.pm krunch.pmc whap.pm whap.pmc); my $Is_EBCDIC = (ord('A') == 193) ? 1 : 0; my $Is_UTF8 = (${^OPEN} || "") =~ /:utf8/; -my $total_tests = 49; +my $total_tests = 50; if ($Is_EBCDIC || $Is_UTF8) { $total_tests -= 3; } print "1..$total_tests\n"; @@ -258,6 +258,20 @@ EOT } } +# [perl #49472] Attributes + Unkown Error + +{ + do_require + 'use strict;sub MODIFY_CODE_ATTRIBUTE{} sub f:Blah {$nosuchvar}'; + my $err = $@; + $err .= "\n" unless $err =~ /\n$/; + unless ($err =~ /Global symbol "\$nosuchvar" requires /) { + $err =~ s/^/# /mg; + print "${err}not "; + } + print "ok ", ++$i, " [perl #49472]\n"; +} + ########################################## # What follows are UTF-8 specific tests. # # Add generic tests before this point. # diff --git a/toke.c b/toke.c index 2ae8b75..ecee902 100644 --- a/toke.c +++ b/toke.c @@ -692,6 +692,7 @@ Perl_lex_start(pTHX_ SV *line, PerlIO *rsfp, bool new_filter) #else parser->nexttoke = 0; #endif + parser->error_count = oparser ? oparser->error_count : 0; parser->copline = NOLINE; parser->lex_state = LEX_NORMAL; parser->expect = XSTATE; -- 1.6.2.3


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.