Dearest Monks,
I'm trying to use the WebService::Plotly module. It works great on two computers (running p5.20.1 on OS X 10.10.3), but it dies without warnings on three other computers (running p5.20.1 on OS X 10.8.4) dumping:
HTTP::Response=HASH(0x7f87ba65afe0)
Do you have any suggestions as to how to solve this problem?
Here is the code:
use Modern::Perl;
use WebService::Plotly;
my $plotly = WebService::Plotly->new( un => $user,
key => $key);
my @ss = map {[split]}(
'2.1120 0.0047',
'2.1160 0.0045',
'2.1200 0.0058',
'2.1240 0.0045',
'2.1280 0.0036',
'2.1320 0.0029',
'2.1360 0.0024',
'2.1400 0.0032',
'2.1440 0.0020',
'2.1480 0.0014',
);
my @ds = map{$_->[0]} @ss;
my @ps = map{$_->[1]} @ss;
my $response = $plotly->plot( \@ds, \@ps );
print "url is: $response->{url} \n";
print "filename on our server is: $response->{filename} \n";
For the computers that it works, I can dump $response:
$VAR1 = {
'filename' => 'plot from API (7)',
'warning' => '',
'url' => 'https://plot.ly/~demianriccardi/113',
'message' => '',
'error' => ''
};
Thanks!
D
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.