Hi all,
While trying to install telemac on both Linux and Windows OS, I had a chance to read the perl scripts for launching telemac's programs - files in the bin/ directory.
I think that some of these scripts could be largely improved.
For example:
- reduce code duplication by using perl object oriented aspects.
- reduce scripts size by using pre-existing packages (In particular I think about Cwd, File::Spec, File::Path, and maybe Log4perl too) This may also be useful to reduce the number of errors and improve OS portability
- remove some ugly code like
$systelIni=dirname($0);
$systelIni=dirname($systelIni);
$systelIni="$systelIni$ps"."config$ps"."systel.ini";
and replace it with
$systelIni = catfile(dirname($0),"..","config","systel.ini");
- make code compliant with 'strict' and 'warnings' pragma (just try to run bin/runtel.pl with the -w and -s switches)
- improve crossplateformness (i.e. remove code like that
if($ENV{"OS"} eq "Windows_NT")
{
#---- Cas du systeme Windows NT
$ps="\\";
($BASE, $TMP) = split(/\n/, `CD`); # On enleve le NewLine a la fin
#...
}
else
{
#---- Cas du systeme UNIX
$ps="/";
($BASE, $TMP) = split(/\n/, `pwd`); # On enleve le NewLine a la fin
# ...
}
I'm willing to do the proposed code changes and to test them under windows and linux. Nevertheless I would know if there is any chance to get the contributions included in a future telemac release. After a quick search, I could not find any license text for the telemac system. So, my two main questions are:
- what do you think about the proposed code changes?
- what is the telemac's team's policy about user code contribution?
Best regards,
Cédric