Skip to Main Content
Perl in a Nutshell, 2nd Edition
book

Perl in a Nutshell, 2nd Edition

by Nathan Patwardhan, Ellen Siever, Stephen Spainhour
June 2002
Beginner content levelBeginner
759 pages
80h 42m
English
O'Reilly Media, Inc.
Content preview from Perl in a Nutshell, 2nd Edition

DB

The DB module abstracts and provides all of the hooks into Perl internal debugging functionality, so that various implementations of Perl debuggers (or packages that want simply to get at the “privileged” debugging data) can all benefit from the development of this common code. The following “public” global names can be read by clients of this API, but should be considered read-only:

$DB_HASH

Stores key/data pairs in data files; equivalent to other hashing packages such as DBM, NDBM, ODBM, GDBM, and SDBM.

$DB::sub

Name of current executing subroutine.

%DB::sub

The keys of this hash are the names of all the known subroutines. Each value is an encoded string that has the sprintf format ("%s:%d-%d", filename, fromline, toline).

$DB::single

Single-step flag. Will be true if the API will stop at the next statement.

$DB::signal

Signal flag. Will be true if a signal was caught.

$DB::trace

This flag is set to true if the API is tracing through subroutine calls.

@DB::args

Contains the arguments of current subroutine, or the @ARGV array if in the toplevel context.

@DB::dbline

List of lines in currently loaded file.

%DB::dbline

Actions in current file (keys are line numbers). The values are strings that have the sprintf format ("%s\000%s", breakcondition, actioncode).

$DB::package

Package namespace of currently executing code.

$DB::filename

Currently loaded filename.

$DB::subname

Fully qualified name of currently executing subroutine.

$DB::lineno

Line number that will be executed next.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Perl by Example, Fourth Edition

Perl by Example, Fourth Edition

Ellie Quigley
Perl Cookbook, 2nd Edition

Perl Cookbook, 2nd Edition

Tom Christiansen, Nathan Torkington
Perl in a Nutshell

Perl in a Nutshell

Nathan Patwardhan, Ellen Siever, Stephen Spainhour
Learning Perl, 7th Edition

Learning Perl, 7th Edition

Randal L. Schwartz, brian d foy, Tom Phoenix

Publisher Resources

ISBN: 0596002416Errata Page