NAME
App::SmokeBrew::Tools - Various utility functions for smokebrew
SYNOPSIS
use strict;
use warnings;
use App::SmokeBrew::Tools;
# Fetch a perl source tarball
my $filename = App::SmokeBrew::Tools->fetch( $path_to_fetch, $where_to_fetch_to );
# Extract a tarball
my $extracted_loc = App::SmokeBrew::Tools->extract( $tarball, $where_to_extract_to );
# Find the smokebrew directory
my $dir = App::SmokeBrew::Tools->smokebrew_dir();
# Obtain a list of perl versions
my @perls = App::SmokeBrew::Tools->perls(); # All perls >= 5.006
my @stables = App::SmokeBrew::Tools->perls( 'rel' );
my @devs = App::SmokeBrew::Tools->perls( 'dev' );
my @recents = App::SmokeBrew::Tools->perls( 'recent' );
my $perl = '5.13.0';
if ( App::SmokeBrew::Tools->devel_perl( $perl ) ) {
print "perl ($perl) is a development perl\n";
}
DESCRIPTION
App::SmokeBrew::Tools provides a number of utility functions for smokebrew.
FUNCTIONS
fetch
-
Requires two mandatory parameters and one optional. The first two parameters are the path to fetch from a CPAN mirror and the file system path where you want the file fetched to. The third, optional parameter, is an arrayref of CPAN mirrors that you wish the file to fetched from.
Returns the path to the fetched file on success, false otherwise.
This function is a wrapper around File::Fetch.
extract
-
Requires two mandatory parameters, the path to a file that you wish to be extracted and the file system path of where you wish the file to be extracted to. Returns the path to the extracted file on success, false otherwise.
This function is a wrapper around Archive::Extract.
smokebrew_dir
-
Returns the path to where the
.smokebrew
directory may be found. perls
-
Returns a list of perl versions. Without a parameter returns all perl releases >= 5.006
Specifying
rel
as the parameter will return allstable
perl releases >= 5.006Specifying
dev
as the parameter will return only thedevelopment
perl releases >= 5.006Specifying
recent
as the parameter will return only thestable
perl releases >= 5.008009 devel_perl
-
Takes one parameter a perl version to check.
Returns true if given perl is a development perl.
perl_version
-
Takes one parameter a perl version.
Returns the version with the
perl-
prefix.
AUTHOR
Chris BinGOs
Williams
LICENSE
Copyright © Chris Williams
This module may be used, modified, and distributed under the same terms as Perl itself. Please see the license that came with your Perl distribution for details.