Skip to content

Commit

Permalink
More mall README/perlpod changes
Browse files Browse the repository at this point in the history
gcd-dbg.pl: make sure to use the local Trepan.
  • Loading branch information
Rocky Bernstein committed Jun 9, 2012
1 parent c640019 commit 9af0eb7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Expand Up @@ -34,14 +34,16 @@ Jore's [Enbugger](http://search.cpan.org/~jjore/Enbugger/):

# This needs to be done once and could even be in some sort of conditional code
require Enbugger; Enbugger->load_debugger( 'trepan' );
# Alternatively, to unconditinally load Enbugger and trepan:
use Enbugger 'trepan';

# work, work, work...
# Oops! there was an error! Enable the debugger now!
Enbugger->stop; # or Enbugger->stop if ...

Or if you just want POSIX-shell-like `set -x` line tracing:

$ trepan.pl -x perl-program [perl-program-opts]
$ trepan.pl -x -- perl-program [perl-program-opts]

Inside the debugger tracing is turned on using the command `set trace print`.
There is extensive help from the `help` command.
Expand Down
1 change: 1 addition & 0 deletions example/gcd-dbg.pl
@@ -1,6 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
use rlib '../lib';
use Enbugger 'trepan';
# GCD. We assume positive numbers
sub gcd($$);
Expand Down
4 changes: 3 additions & 1 deletion lib/Devel/Trepan.pm
Expand Up @@ -59,14 +59,16 @@ Jore's L<Enbugger>:
# This needs to be done once and could even be in some sort of
# conditional code
require Enbugger; Enbugger->load_debugger( 'trepan' );
# Alternatively, to unconditinally load Enbugger and trepan:
use Enbugger 'trepan';
# work, work, work...
# Oops! there was an error! Enable the debugger now!
Enbugger->stop; # or Enbugger->stop if ...
Or if you just want POSIX-shell-like C<set -x> line tracing:
$ trepan.pl -x perl-program [perl-program-opts]
$ trepan.pl -x -- perl-program [perl-program-opts]
Inside the debugger tracing is turned on using the command C<set trace print>.
There is extensive help from the C<help> command.
Expand Down

0 comments on commit 9af0eb7

Please sign in to comment.