Skip Menu |

This queue is for tickets about the Chart-Gnuplot CPAN distribution.

Report information
The Basics
Id: 82525
Status: resolved
Priority: 0/
Queue: Chart-Gnuplot

People
Owner: Nobody in particular
Requestors: CDRAKE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.17
Fixed in: (no value)



Subject: barfs on spaces in .exe path ('C:\Program' is not recognized as an internal or external command,)
This code:- my $chart = Chart::Gnuplot->new( gnuplot=> "C:\\Program Files (x86)\\gnuplot\\bin\\gnuplot.exe", .... Causes this:- C:\>perl gplt.pl 'C:\Program' is not recognized as an internal or external command, operable program or batch file. C:\>
Line 970 in Gnuplot.pm is the problem. OLD (wrong):- my $cmd = qq("$gnuplot" "$self->{_script}"); NEW (fixed):- my $cmd = qq("$gnuplot" "$self->{_script}"); I also recommend adding this, above the line above it (e.g. immediately after the "my $gnuplot = 'gnuplot';" line), so it picks the right path for 99% of users:- if($^O=~/Win32/i){ $gnuplot = "C:\\Program Files (x86)\\gnuplot\\bin\\gnuplot.exe"; $gnuplot = "C:\\Program Files\\gnuplot\\bin\\gnuplot.exe" unless(- e $gnuplot); }