Skip Menu |

This queue is for tickets about the Hook-LexWrap CPAN distribution.

Report information
The Basics
Id: 14390
Status: resolved
Priority: 0/
Queue: Hook-LexWrap

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

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



Subject: Support 5.005 if at all possible
Is there any specific reason that Hook::LexWrap can't be made to support 5.005? I'd like to use this for a module that will be used to other modules and so on, but parts of the dependency chain currently support 5.005 (specifically PPI), and it would be a real shame to have to push all of them up to 5.006 unless it's absolutely necesary. What would it take to get it back to 5.005 support?
Date: Thu, 01 Sep 2005 13:22:32 +1000
From: Damian Conway <damian [...] conway.org>
To: bug-Hook-LexWrap [...] rt.cpan.org
Subject: Re: [cpan #14390] Support 5.005 if at all possible
RT-Send-Cc:
Hi Adam, Show quoted text
> Is there any specific reason that Hook::LexWrap can't be made to support 5.005?
I'm sure there was, but I can't find any documentation on what the problem was. :-( Show quoted text
> I'd like to use this for a module that will be used to other modules and so on, > but parts of the dependency chain currently support 5.005 (specifically PPI), > and it would be a real shame to have to push all of them up to 5.006 unless > it's absolutely necesary. > > What would it take to get it back to 5.005 support?
A patch that tests clean under 5.005_03, 5.6.X, and 5.8.X. ;-) I can only test under 5.8.3 at the moment, so someone else would need to verify the patch for the other major releases. Damian
Show quoted text
> I'm sure there was, but I can't find any documentation on what the > problem > was. :-(
After much effort to get a half-way sane 5.005 install working: For starters... I cleaned up the use of 'our' and 'warnings'. You really should have the use 5.006 _after_ the our you know :) Next, despite never _actually_ documenting it as legal, you casually seem seem to support this. sub foo { 1 } wrap foo, pre => sub { ... }, post => sub { ... }; ... where foo is based as a typeglob or a bareword instead of executing? In 5.005 it executes and thus passes 1 to wrap. Damn you were really going through a "no brackets anywhere" phase during the period you wrote this. Replacing wrap foo with wrap 'foo' throughout the test script gets me all the way to the end, all tests passing. It would seem that the nasty bit was that wrap (*@) makes wrap foo mean wrap *foo on 5.6 or greater but not on 5.005. This seems a hideous things to support, and breaks every rule in *cough*your*cough* the book :) In fact, I bet if we passed it through Perl::Review if would barf all over the place. From the look of it, 5.005 has been sacrificed so that it could a neat prototyping trick. So what to do...? Thoughts?