Sman::Util - Utility functions for Sman
Sman::Util currently provides the following functions:
# XMLEscape escapes XML my $str = Sman::Util::XMLEscape("a-fun#y&%$TRi�g"); # MakeXML makes XML from a simple hash of names->strings my $xml = Sman::Util::MakeXML(\%somehash); # ReadFile reads the contents of a file and returns it as a scalar my $content = Sman::Util::ReadFile("filename"); # RunCommand uses the shell to capture stdout and stderr and $? # Pass command and tempdir to save its temp files in. # tmpdir defaults to '/tmp' my ($out, $err, $dollarquestionmark) = Sman::Util::RunCommand("ls -l", "/tmp"); # GetVersionString gives you a version string like # 'sman v0.8.3 using SWISH::API v0.01 and Swish-e v2.4.0' # pass program name and the Swish-e command path my $vstr = Sman::Util::GetVersionString('prog', '/usr/local/bin/swish-e');
This module implements utility functions for sman-update and sman
Copyright Josh Rabinowitz 2004-2016 <joshr>
sman-update, sman
To install Sman, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Sman
CPAN shell
perl -MCPAN -e shell install Sman
For more information on module installation, please visit the detailed CPAN module installation guide.