Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Dist-Zilla-Plugin-Twitter CPAN distribution.

Report information
The Basics
Id: 72575
Status: resolved
Priority: 0/
Queue: Dist-Zilla-Plugin-Twitter

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

Bug Information
Severity: Normal
Broken in: 0.011
Fixed in: (no value)



Subject: Vague error message when lookup in Net::Netrc fails
The error message used to complain about a call to lpa on an undefined value. This patch runs that in an eval block and returns a more desirable error message.
Subject: 0001-Added-check-for-Net-Netrc-call.patch
From acb983fdadf3873667045a926348b0375520ebfd Mon Sep 17 00:00:00 2001 From: William Orr <will@worrbase.com> Date: Mon, 21 Nov 2011 06:20:52 -0500 Subject: [PATCH] Added check for Net::Netrc call --- lib/Dist/Zilla/Plugin/Twitter.pm | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/lib/Dist/Zilla/Plugin/Twitter.pm b/lib/Dist/Zilla/Plugin/Twitter.pm index e7f7029..a94ee2a 100644 --- a/lib/Dist/Zilla/Plugin/Twitter.pm +++ b/lib/Dist/Zilla/Plugin/Twitter.pm @@ -102,7 +102,11 @@ sub after_release { $msg .= " " . $self->hash_tags; } - my ($l,$p) = Net::Netrc->lookup('api.twitter.com')->lpa; + my ($l, $p); + + eval { + ($l,$p) = Net::Netrc->lookup('api.twitter.com')->lpa; + } or confess "Can't get Twitter credentials from .netrc"; my $nt = Net::Twitter->new( useragent_class => $ENV{DZ_TWITTER_USERAGENT} || 'LWP::UserAgent', traits => [qw/API::REST OAuth/], -- 1.7.7.4
Thanks! Released to CPAN as 0.012.