Gossamer Forum
Home : General : Perl Programming :

strict, warnings and taint mode

Quote Reply
strict, warnings and taint mode
One you have a program working with use strict, use warnings and taint mode, do you disable them for performance reasons? I have been leaving them in the code but I thought I read somewhere here that you should disable them once everything works. I can't seem to find that post now.

Regards,
Charlie
Quote Reply
Re: [CP] strict, warnings and taint mode In reply to
You'd think it would help performance but GT leave them in the code I think.

Its probably more of a pain to take them out as if you need to make alterations/upgrades then you may need to put them back in again.
Quote Reply
Re: [CP] strict, warnings and taint mode In reply to
OK, I found it here: http://www.gossamer-threads.com/...tring=strict;#165622

I see that you should keep using use strict; all the time and stop using -w or use warnings; once everything is working correctly. What about -T taint mode? I found lots of info at perldoc.com on how to use it but nothing really telling when to (or not to) use it. That makes me think you should use it all the time like strict?

Regards,
Charlie
Quote Reply
Re: [RedRum] strict, warnings and taint mode In reply to
That makes sense. I guess if it really mattered it would be more prominent at perldoc.com and GT would take it out of their code like you mentioned. Thanks, Paul.

Regards,
Charlie
Quote Reply
Re: [CP] strict, warnings and taint mode In reply to
Not that anyone should listen to me, but I leave "use strict" in all my scripts.

I'm sure it doesn't make a noticable difference.


Quote Reply
Re: [CP] strict, warnings and taint mode In reply to
I also use the -w and use strict in all my Perl scripts and I have not noticed any performance degradation or processing differences. No benchmark differences.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Chewbaca] strict, warnings and taint mode In reply to
use diagnostics; slows down your perl programs.

use strict; and the -w flag doesn't seem to for me. use strict; is good coding practice in my opinion anyway.

It would be great if use strict; would be introduced to HTML programming.

Wil

- wil
Quote Reply
Re: [Wil] strict, warnings and taint mode In reply to
I think I read somewhere that in future versions of perl use strict will be on by default.
Quote Reply
Re: [Wil] strict, warnings and taint mode In reply to
I decided that I'm going to leave it in. Like Paul said, it will make it easier when I have to go back and make changes and I have never noticed any performance problems. The link I posted above just got me thinking about it. Thanks for your input guys.

Thanks,
Charlie
Quote Reply
Re: [Wil] strict, warnings and taint mode In reply to
There sort of is...with earlier versions of Netscape prior to 6.X not loading pages when there are HTML errors...hehe!

But I understand your logic...it would be nice to have embedded codes to check and diagnose web pages rather than having to validate them via W3C. Although they do have a stand-alone version of the validation application that you can locally test web pages before publishing them...although I've noticed some bugs in testing dynamic web pages...but if you have a template based system, you can simply validate the template files.
========================================
Buh Bye!

Cheers,
Me