> The following patch resolves the discrepancy between print STDERR
> and warn/die, with supplementary tests:
>
> #!/usr/bin/perl -w
> sub TIEHANDLE { bless [] } sub PRINT { $_ = $_[1]; s/^not //; print; }
> print "1..3\n"; tie *STDERR => __PACKAGE__;
> print STDERR "not ok 1 - print STDERR\n";
> warn "not ok 2 - warn\n";
> die "not ok 3 - die\n";
>
> It does so by modifying up Perl_die_where and Perl_vwarn to check
> whether if GvIOp(PL_stderrgv) is tied.
>
> This is my very first C program, so bear with me if there's gaping
> holes in it. :-)
>
> Thanks,
> /Autrijus/
Thanks, applied as 14727, this was very welcome.
Thread Previous