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.
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).
To install App::Grok, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Grok
CPAN shell
perl -MCPAN -e shell install App::Grok
For more information on module installation, please visit the detailed CPAN module installation guide.