Subject: | open_browser does not find command on Windows |
Hello Pedro,
This is a really useful module. However, there are a few issues when
searching for the default command under Windows. The end result is that
it does not find any command.
1. Neither "start" nor "open" are in the default path (that I could
find on Vista), so _search_in_path() will not find them and returns
undef. Maybe special handling for windows is warranted.
2. Also in _search_in_path(), splitting on /:/ does not work with
windows path separators. It needs to be a semi-colon /;/. This can be
corrected with check of the OS before this search, something like the
code below (starting from line 89). I can provide this as a diff if
you'd prefer.
----
my $sep = q{:}; # path list separator for *nix systems
if ( $^O eq 'MSWin32' ) {
$sep = q{;};
}
for my $path (split($sep, $ENV{PATH})) {
----
The work-around to the above issues is to add an OS check in the calling
code, but it does clutter things a bit.
Regards,
Shawn Laffan.