CPANPLUS::Dist::Slackware::Util - Utility functions
This document describes CPANPLUS::Dist::Slackware::Util version 1.028.
use CPANPLUS::Dist::Slackware::Util qw(can_run run slurp spurt filetype gzip); my $program = can_run('perl'); if ( $program ) { my $cmd = [ $program, '-v' ]; my $output = ''; if ( run( $cmd, { buffer => \$output } ) ) { print $output; } } if ( spurt( '/tmp/hello.txt', 'hello, world' ) ) { my $str = slurp('/tmp/hello.txt'); if ( my $filename = gzip('/tmp/hello.txt') ) { print $filename, ': ', filetype($filename), "\n"; } }
This module provides utility functions for CPANPLUS::Dist::Slackware.
Locate a program and return the path to the binary or undef.
Run a command in the current or a specified directory. Optionally stores the output in a scalar.
Read a file.
Write to a file.
Get a file's type.
Compress a file.
Strip object files.
A file could not be opened for writing.
Is a file system full?
An external command failed to execute.
None.
See CPANPLUS::Dist::Slackware.
None known.
CPANPLUS::Dist::Slackware
Andreas Voegele <voegelas@cpan.org>
Please report any bugs to bug-cpanplus-dist-slackware at rt.cpan.org, or through the web interface at http://rt.cpan.org/.
bug-cpanplus-dist-slackware at rt.cpan.org
Copyright 2017-2020 Andreas Voegele
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://dev.perl.org/licenses/ for more information.
To install CPANPLUS::Dist::Slackware, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CPANPLUS::Dist::Slackware
CPAN shell
perl -MCPAN -e shell install CPANPLUS::Dist::Slackware
For more information on module installation, please visit the detailed CPAN module installation guide.