Main > Programming > Libraries >

Script::Toolbox 0.19

Script::Toolbox 0.19

Sponsored Links

Script::Toolbox 0.19 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.018 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 927
Date added: 2007-04-11
Publisher: Matthias Eckardt

Script::Toolbox 0.19 description

Script::Toolbox is a Perl framework for the daily business scripts.

SYNOPSIS

use Script::Toolbox qw(:all);
or
use Script::Toolbox qw(Open Log Exit Table Usage Dir File System)

$e = Script::Toolbox->new();
#
# logging
#
Log( "log message" ); # log to STDERR
Log( "log message", STDERR ); # log to STDERR
Log( "log message", STDOUT ); # log to STDOUT
Log( "log message", /tmp/x ); # log to /tmp/x
Log( "log message", new IO::File "/tmp/XXX" ); # log to /tmp/XXX

Script::Toolbox->new({logdir=>{mod=>=s,desc=>Log directory,
mand=>1,default=>/var/log}});
Log( "log message" ); # log to /var/log/ .log

Log( "log message",syslog,severity,tag ); # log via syslogd

#
# print formatted tables like:
# print join "n", @{$t};

$t = $e->Table( [ "1;2;3","44;55;66","7.77;8.88;9.99" ] );
$t = $e->Table( [ "1|2|3","44|55|66","7.77|8.88|9.99" ], |);
$t = $e->Table( [ This is the title,
[ --H1--, --H2--,--H3--],
[ 11:11:11, 33.456, cc ],
[ 12:23:00, 2222222, 3 ],
[ 11:11, 222, 3333333333333333 ]);
$t = $e->Table({ title => Hash example,
head => [Col1, Col2, Col3],
data => [[ 11:11:11, 33.456, cc ],
[ 12:23:00, 2222222, 3 ],
[ 11:11, 222, 3333333333333333 ]]});
$t = $e->Table({ title => Hash with automatic column heads (F1,F2,F3),
data =>[{F1=>aaaa,F2=>bbb,F3=>c},
{F1=>dd ,F2=>ee ,F3=>f}]});

#
# command line options
#
$tb=Script::Toolbox->new({file=>{mod=>=s,desc=>Description,
mand=>1,default=>/bin/cat}});

$file = tb->GetOpt(file); # depricated, use the following
$file = tb->{file};

$old = tb->SetOpt(newFile);

Usage(); # print a usage message for all options
# if available print also the POD

Usage(This is additional text for the usage);

#
# Directory handling
#
$arrRef = Dir(/tmp ); # all except . and ..
$arrRef = Dir(/tmp, .*patt ); # all matching patt
$arrRef = Dir(/tmp, !.*patt ); # all not matching patt

#
# File handling
#
$arrRef = File(path/to/file); # read file into array
$arrRef = File("/bin/ps |"); # read comand STDOUT into array

File( "> path/to/file", override the old content );
File( "path/to/file", append this to the file );
File( "path/to/file", $arrRef ); # append array elements
File( "path/to/file", $arrRef, $recSep ); # append array elements
File( "path/to/file", $hashRef, $recSep, $fieldSep); # append as key <$fldSep> value lines
File( "| /bin/cat", "Hello world.n" );

$fileHandle = TmpFile(); # open new temporary file
$arrRef = TmpFile($fileHandle) # read temp whole file

#
# Miscelleanous
#
Exit( 1, "Exit message" ); # exit with returncode 1,
# write exit message via Log()

$fh = Open( "> /tmp/xx" ); # return an IO::File object with
# /tmp/xx opened for write
# die with logfile entry if failed
$fh = Open( "/bin/ps |" ); # return an IO::File object
# die with logfile entry if failed
$rc = System("/bin/ls") # execute a system command and
# report its output into the
# logfile.
$now = Now();
printf "Day:%d Mon:%d Year:%d Wday:%d Yday:%d IsDST:%d Sec:%d Min:%d Hour:%d",
$now->{mday},
$now->{mon},
$now->{year},
$now->{wday},
$now->{yday},
$now->{isdst},
$now->{sec},
$now->{min},
$now->{hour};
$now = Now("%A, %B %d, %Y"); # Monday, October 10, 2005
=head1 ABSTRACT

This module should be a "swiss army knife" for the daily tasks. The main goals are command line processing, automatic usage messages, signal catching (with logging), simple logging, simple data formatting, simple directory and file processing.

Script::Toolbox 0.19 Screenshot

Advertisements

Script::Toolbox 0.19 Keywords

Bookmark Script::Toolbox 0.19

Hyperlink code:
Link for forum:

Script::Toolbox 0.19 Copyright

WareSeeker periodically updates pricing and software information of Script::Toolbox 0.19 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Script::Toolbox 0.19 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
Interceptor is a KDE 3.1 kicker applet for syslog monitoring and alerts management. Free Download
Carp::Datum is a Perl module used for debugging and tracing. Free Download
jclassinfo is an information extractor for Java bytecode. Free Download
passlogd is a purpose-built sniffer for capturing syslog messages in transit. Free Download
hslogger is a logging framework for Haskell, roughly similar to Pythons logging module. Free Download
libdaemon is a lightweight C library that eases the writing of UNIX daemons. Free Download
XML::Atom is an Atom feed and API implementation. Free Download
acoc is a regular-expression based colour formatter for programs that display output on the command-line. Free Download