Main > Programming > Libraries >

Carp::Datum 0.1.3

Carp::Datum 0.1.3

Sponsored Links

Carp::Datum 0.1.3 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.038 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 833
Date added: 2007-07-13
Publisher: Dave Hoover

Carp::Datum 0.1.3 description

Carp::Datum is a Perl module used for debugging and tracing.

SYNOPSIS

# In modules
use Carp::Datum;

# Programming by contract
sub routine {
DFEATURE my $f_, "optional message"; # $f_ is a lexical lvalue here
my ($a, $b) = @_;
DREQUIRE $a > $b, "a > b";
$a += 1; $b += 1;
DASSERT $a > $b, "ordering a > b preserved";
my $result = $b - $a;
DENSURE $result < 0;
return DVAL $result;
}

# Tracing
DTRACE "this is a debug message";
DTRACE TRC_NOTICE, "note: a = ", $a, " is positive";
DTRACE {-level => TRC_NOTICE, -marker => "!!"}, "note with marker";

# Returning
return DVAL $scalar; # single value
return DARY @list; # list of values

# In applications main
use Carp::Datum qw(:all on); # turns Datum "on" or "off"

DLOAD_CONFIG(-file => "debug.cf", -config => "config string");

The Carp::Datum module brings powerful debugging and tracing features to development code: automatic flow tracing, returned value tracing, assertions, and debugging traces. Its various functions may be customized dynamically (i.e. at run time) via a configuration language allowing selective activation on a routine, file, or object type basis. See Carp::Datum::Cfg for configuration defails.
Carp::Datum traces are implemented on top of Log::Agent and go to its debugging channel. This lets the application have full control of the final destination of the debugging information (logfile, syslog, etc...).

Carp::Datum can be globally turned on or off by the application. It is off by default, which means no control flow tracing (routine entry and exit), and no returned value tracing. However, assertions are still fully monitored, and the DTRACE calls are redirected to Log::Agent.

The C version of Carp::Datum is implemented with macros, which may be redefined to nothing to remove all assertions in the released code. The Perl version cannot be handled that way, but comes with a Carp::Datum::Strip module that will lexically remove all the assertions, leaving only DTRACE calls. Modules using Carp::Datum can make use of Carp::Datum::MakeMaker in their Makefile.PL to request stripping at build time. See Carp::Datum::MakeMaker for instructions.

Here is a small example showing what traces look like, and what happens by default on assertion failure. Since Log::Agent is not being customized, the debugging channel is STDERR. In real life, one would probably customize Log::Agent with a file driver, and redirect the debug channel to a file separate from both STDOUT and STDERR.

Carp::Datum 0.1.3 Screenshot

Advertisements

Carp::Datum 0.1.3 Keywords

Bookmark Carp::Datum 0.1.3

Hyperlink code:
Link for forum:

Carp::Datum 0.1.3 Copyright

WareSeeker periodically updates pricing and software information of Carp::Datum 0.1.3 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 Carp::Datum 0.1.3 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
App::Manager is a Perl module for installing, managing and uninstalling software packages. Free Download
Pod::XML is a Perl module to convert POD to XML. Free Download
App::Modular is a Perl module with modularization framework for perl programs. Free Download
Pod::Template is a Perl module for building pod documentation from templates. Free Download
dtRdr::User.pm is a user class as a Perl module. Free Download
Template::Plugin::Datum is a Perl module with TT2 plugin that converts international date format to German date format. Free Download
Apache::Storage is Perl module containing simple functions to store and retrieve information from within the Apache process. Free Download
DCE::UUID is a Perl module with misc UUID functions. Free Download