summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgaurav <gaurav@ggvaidya.com>2016-05-27 19:28:34 +0530
committergaurav <gaurav@ggvaidya.com>2016-05-27 19:28:34 +0530
commit2736f75202266adcc06c46a887ad252b231160ce (patch)
treee95cd34f5d3ef5cf3360b75e34359c14ce43d57f
parentad1a4bc33623b9bca05f827014b64097907aacfb (diff)
downloadwww-pocket-2736f75202266adcc06c46a887ad252b231160ce.tar.gz
www-pocket-2736f75202266adcc06c46a887ad252b231160ce.zip
Improved consumer key input documentation.
-rw-r--r--lib/WWW/Pocket/Script.pm10
1 files changed, 9 insertions, 1 deletions
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 = <STDIN>);
+ my $key = <STDIN>;
+
+ # Trim start and end.
+ $key =~ s/^\s*(.*)\s*$/$1/;
+ # print "Key entered: '$key'\n";
+
return $key;
}