the filehandle munging in open2 and open3 (as well as in
many other modules i imagine) to do something like this:
$dad_rdr =~ s/^[^']+$/$package'$&/ unless ref $dad_rdr;
$dad_wtr =~ s/^[^']+$/$package'$&/ unless ref $dad_rdr;
and in general, the stab mungers probably should have something
like
unless (ref $fh) {
my $package = caller;
$fh =~ s/^([^']+)$/$package'$1/;
}
Hm.. that isn't going to help with regular *FH instead
of \*FH, is it? Do I have to say
unless ( ref($fh) || ref( \$fh ) eq 'GLOB' ) ....
Gosh, I don't like these.
--tom
many other modules i imagine) to do something like this:
$dad_rdr =~ s/^[^']+$/$package'$&/ unless ref $dad_rdr;
$dad_wtr =~ s/^[^']+$/$package'$&/ unless ref $dad_rdr;
and in general, the stab mungers probably should have something
like
unless (ref $fh) {
my $package = caller;
$fh =~ s/^([^']+)$/$package'$1/;
}
Hm.. that isn't going to help with regular *FH instead
of \*FH, is it? Do I have to say
unless ( ref($fh) || ref( \$fh ) eq 'GLOB' ) ....
Gosh, I don't like these.
--tom