Subject: | Portable filenames |
I have noticed that Statistics::R does not seem to provide filenames
that are cross-platform.
At line 58 of Statistics/R/Bridge.pm there is attempts to convert
unix-like filenames to Windows:
$this->{ START_R } = "$this->{LOG_DIR}/start.r";
...
if ( $this->{ OS } eq 'win32' ) {
$this->{ START_R } =~ s/\//\\/g;
However, in some other locations, like line 31 or 45, such attempts are
not made. The use of the catfile() function of File::Spec
(http://perldoc.perl.org/File/Spec.html) would be a much more efficient
way of dealing with filenames. For example, the example of line 58 could
be replaced simply by:
use File::Spec::Functions;
$this->{ START_R } = catfile($this->{LOG_DIR}, "start.r");
I am happy to give a hand.
Regards,
Florent