The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

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

SYNOPSIS

 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);

DESCRIPTION

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

FUNCTIONS

download

Downloads 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_dir

Creates (if necessary) and then returns the name of the directory where grok stores its data (e.g. ~/.grok).