NAME

VCP::Debug - debugging support for VCP

SYNOPSIS

DESCRIPTION

Debugging support for VCP. Enabled by setting the environment variable VCPDEBUG=1.

debug
debug $foo if debugging $self ;

Emits a line of debugging (a "\n" will be appended). Use to avoid the "\n". Any undefined parameters will be displayed as <undef>.

debugging
debug "blah" if debugging ;

Returns TRUE if the caller's module is being debugged

debug "blah" if debugging $self ;
debug "blah" if debugging $other, $self ; ## ORs the arguments together

Returns TRUE if any of the arguments are being debugged. Plain strings can be passed or blessed references.

profiling

Returns true if VCP is profiling itself compared to shell command performance.

This is different from using perl's profilers (-d:DProf and the like); this profiling tracks the operation of some of VCP's internals and also how long is spent waiting for child processes to complete.

$VCP::Debug::profile_category

Sets the category for the next profile_start and profile_end pair of calls:

local $VCP::Debug::profile_category = "p4 files" if profiling;
profile_start

Notes the current time as the start of a profiling interval.

Defaults to the category $profile_category if none passed.

profile_end

Notes the current time as the end of a profiling interval.

Defaults to the category $profile_category if none passed.

profile_group

Called with the prefix of a set of profile categories to sum up and emit subtotals for.

COPYRIGHT

Copyright 2000, Perforce Software, Inc. All Rights Reserved.

This module and the VCP package are licensed according to the terms given in the file LICENSE accompanying this distribution, a copy of which is included in vcp.

AUTHOR

Barrie Slaymaker <barries@slaysys.com>