Josh Rabinowitz > Sman > Sman::Util

Download:
Sman-1.03.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source   Latest Release: Sman-1.03_002

NAME ^

Sman::Util - Utility functions for Sman

SYNOPSIS ^

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');

DESCRIPTION ^

This module implements utility functions for sman-update and sman

AUTHOR ^

Copyright Josh Rabinowitz 2004-2005 <joshr>

SEE ALSO ^

sman-update, sman

syntax highlighting: