Subject: | Hook::LexWrap crashed perl.exe on 5.6.1 |
I decided to try out Hook::LexWrap 0.20 and Installed it using PPM. Tried to just paste the SYNOPSIS code to STDIN and perl.exe crashed (Windows dialog: perl.exe - Application Error. The instruction at xxxx referenced memory at 0x00000000. The memory could not be "read".)
Tried to create a file and paste the code into it. Same crash.
* Hook::LexWrap 0.20
* Windows 2000.
* perl -v
This is perl, v5.6.1 built for MSWin32-x86-multi-thread
(with 1 registered patch, see perl -V for more detail)
Copyright 1987-2001, Larry Wall
Binary build 632 provided by ActiveState Corp. http://www.ActiveState.com
Built 03:40:44 Jun 3 2002
The code that crashed is directly from the SYNOPSIS:
<code>
use Hook::LexWrap;
sub doit { print "[doit:", caller, "]"; return {my=>"data"} }
SCOPED: {
wrap doit,
pre => sub { print "[pre1: @_]\n" },
post => sub { print "[post1:@_]\n"; $_[1]=9; };
my $temporarily = wrap doit,
post => sub { print "[post2:@_]\n" },
pre => sub { print "[pre2: @_]\n "};
@args = (1,2,3);
doit(@args); # pre2->pre1->doit->post1->post2
}
@args = (4,5,6);
doit(@args); # pre1->doit->post1
</code>