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


grok documentation  | view source Contained in the grok distribution.

Index


NAME

Top

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

SYNOPSIS

Top

 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

Top

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

FUNCTIONS

Top

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


grok documentation  | view source Contained in the grok distribution.