On Tue Jan 01 00:01:21 2008, THALJEF wrote:
Show quoted text> Yeah, many people have commented that PBP recommends several Conway
> modules that aren't fully baked yet. Hopefully, the Perl community will
> persuade Damian to fix those modules and/or submit patches to him.
I'll take a swing at patching them.
Show quoted text> I can be convinced to lower the default severity on this to 4. I don't
> have a copy of PBP in front of me at the moment, but I think I
> originally set the severity to 5 because PBP demonstrated how -t can
> give the wrong answer in certain situations.
Only if you mess around with *ARGV. I'm not entirely sure I agree with
the logic of looking at ARGV vs STDIN to determine interactivity. One
seems to be "is there input" and the other more "is there a human at the
other end of the line?"
Show quoted text> But if is_interactive() is
> also wrong in some cases, then I suppose it is a wash.
>
> Good enough?
There's the third part. The implication that -t means "you're checking
to see if the program is being run interactively" only applies to STDIN,
STDOUT and maybe ARGV. There's not much you can say about -t on any
other filehandle. Granted, I haven't run into this case yet.
I've been mentally classifying critics into those which are about
straightforward less-than-optimal practice (2 arg open, bareword
filehandles, not turning on strict) and those which speculate on the
author's intent such as this one. The former are more definitive and
usually of a higher severity.