From 2736f75202266adcc06c46a887ad252b231160ce Mon Sep 17 00:00:00 2001 From: gaurav Date: Fri, 27 May 2016 19:28:34 +0530 Subject: Improved consumer key input documentation. --- lib/WWW/Pocket/Script.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/WWW/Pocket/Script.pm b/lib/WWW/Pocket/Script.pm index 005d126..b060afc 100644 --- a/lib/WWW/Pocket/Script.pm +++ b/lib/WWW/Pocket/Script.pm @@ -134,8 +134,16 @@ sub _authenticate { sub _prompt_for_consumer_key { my $self = shift; + print "Consumer key required. You can sign up for a consumer key as a\n" . + "Pocket developer at https://getpocket.com/developer/apps/new.\n"; + print "Enter your consumer key: "; - chomp(my $key = ); + my $key = ; + + # Trim start and end. + $key =~ s/^\s*(.*)\s*$/$1/; + # print "Key entered: '$key'\n"; + return $key; } -- cgit v1.2.3-54-g00ecf