in reply to Re: Trapping re 'debug'
in thread Trapping re 'debug'
Ok, so I tried that and got marginally closer. At least the "Freeing" line isn't visible anymore. So why isn't PRINT, PRINTF, or WRITE being called with the data? That's really the final bit that would have to work for it to even have a point. The following code outputs nothing except "DESTROY\n".
package TrapRe; sub TIEHANDLE { my $class = shift; my $fh = \do { local *HANDLE }; bless $fh, $class; } sub CLOSE { close $_[0] } eval qq[sub $_ { print "$_\n" };] for qw/READ READLINE GETC WRITE PRINT PRINTF BINMODE EOF FILENO SEEK TELL OPEN DESTROY UNTIE/; package main; BEGIN { close STDERR; tie *STDERR, TrapRe; } use re 'debug'; 1 =~ 1;
Seeking Green geeks in Minnesota
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re^2: Trapping re 'debug'
by Anonymous Monk on Jan 27, 2003 at 17:04 UTC | |
by diotalevi (Canon) on Jan 27, 2003 at 17:38 UTC |