
App::Grok::Common - Common functions used in grok

use strict; use warnings; use App::Grok::Common qw<:ALL>; # download a file, with a progress bar my $url = 'http://foo.bar/baz'; my $content = download('My file', $url);

This module provides common utility functions used in App::Grok.

downloadDownloads a file from the web and returns the contents. Prints a progress bar (if Term::ProgressBar is installed) as while doing so. It takes two arguments, a title string and the url. Returns the downloaded content.
data_dirCreates (if necessary) and then returns the name of the directory where grok stores its data (e.g. ~/.grok).