Tetra-WebBBS Support Forum

Re: Your 0.02 + my 0.02 = 0.04 maybe $0.05

Hi John,

sure, *all* new code should *use strict*. That's clear to me.

Example to clarify myself:

entry_script.pl:

 

shebang line

use strict;

whatever starting procedure (parsing and stuff);

if (new/rewritten fuction whatsoever)
{ go new code/module whatever;}
elsif ( other new/rewritten function)
{ go new code/module... ;}
more elsif(s)
else # go old code/version
{
no strict;
require old_config_file.pl;
exit;
}

# from here everything applying to 'all' new code
shutdown database;
run template_engine;
whatever to clean up;

# end of entry script #



this way we 'use strict' in general but turn it of whenever switching to old code.

When rewriting code, copy it from the original scripts, move to new structure and make it clean (use strict and so on)
This will lead to copies of old code in old script and updated old code copied to new version. (example for this: Cookie_handler)

Did this make things clearer?
Sorry, it's sometime a bit complicated for me to explain my confusing ideas  :D

cu
Rainer