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
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.