Subject: | Use of uninitialized value in string eq |
Date: | Tue, 14 Oct 2014 13:30:28 +0100 |
To: | bug-WWW-PushBullet [...] rt.cpan.org |
From: | Simon Aldrich <simon [...] aldrich.eu> |
With WWW::PushBullet v1.2.4 I'm getting the following warning when using
'push_note':
'Use of uninitialized value in string eq at
/usr/local/share/perl/5.18.2/WWW/PushBullet.pm line 211.'
My push_note call is as documented, i.e.:
$pb->push_note( { device_id => $iden,
title => $title,
body => $body } );
It seems that in 'sub _pushes' '$content->[$i]' may not defined. The
following patch seems to sort out the problem:
211c211,214
< $type = $content->[$i + 1] if ($content->[$i] eq 'type');
---
Show quoted text
> if (defined($content->[$i]) && ($content->[$i] eq 'type'))
> {
> $type = $content->[$i + 1];
> }
Patch file attached
Regards
Simon Aldrich
Message body is not shown because sender requested not to inline it.