FAQ

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.

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 2 | next ›
Discussion Overview
groupperl5-porters @
categoriesperl
postedFeb 17, '02 at 11:54a
activeFeb 17, '02 at 12:43p
posts2
users2
websiteperl.org

2 users in discussion

Autrijus Tang: 1 post Arthur Bergman: 1 post

People

Translate

site design / logo © 2021 Grokbase