perl

 view release on metacpan or  search on metacpan

lib/B/Deparse.pm  view on Meta::CPAN


    foreach my $i (@_) { 0 }
  =>
    foreach my $i (@_) { '???' }

=item *

Lexical (my) variables declared in scopes external to a subroutine
appear in coderef2text output text as package variables.  This is a tricky
problem, as perl has no native facility for referring to a lexical variable
defined within a different scope, although L<PadWalker> is a good start.

See also L<Data::Dump::Streamer>, which combines B::Deparse and
L<PadWalker> to serialize closures properly.

=item *

There are probably many more bugs on non-ASCII platforms (EBCDIC).

=back

=head1 AUTHOR

Stephen McCamant <smcc@CSUA.Berkeley.EDU>, based on an earlier version

lib/perl5db.pl  view on Meta::CPAN

sub _DB__handle_y_command {
    my ($obj) = @_;

    if (my ($match_level, $match_vars)
        = $obj->cmd_args =~ /\A(?:(\d*)\s*(.*))?\z/) {

        # See if we've got the necessary support.
        if (!eval {
            local @INC = @INC;
            pop @INC if $INC[-1] eq '.';
            require PadWalker; PadWalker->VERSION(0.08) }) {
            my $Err = $@;
            _db_warn(
                $Err =~ /locate/
                ? "PadWalker module not found - please install\n"
                : $Err
            );
            next CMD;
        }

        # Load up dumpvar if we don't have it. If we can, that is.
        do 'dumpvar.pl' || die $@ unless defined &main::dumpvar;
        defined &main::dumpvar
            or print $OUT "dumpvar.pl not available.\n"
            and next CMD;

        # Got all the modules we need. Find them and print them.
        my @vars = split( ' ', $match_vars || '' );

        # Find the pad.
        my $h = eval { PadWalker::peek_my( ( $match_level || 0 ) + 2 ) };

        # Oops. Can't find it.
        if (my $Err = $@) {
            $Err =~ s/ at .*//;
            _db_warn($Err);
            next CMD;
        }

        # Show the desired vars with dumplex().
        my $savout = select($OUT);

lib/perl5db.pl  view on Meta::CPAN


In Perl 5.8.0, a realignment of the commands was done to fix up a number of
problems, most notably that the default case of several commands destroying
the user's work in setting watchpoints, actions, etc. We wanted, however, to
retain the old commands for those who were used to using them or who preferred
them. At this point, we check for the new commands and call C<cmd_wrapper> to
deal with them instead of processing them in-line.

=head4 C<y> - List lexicals in higher scope

Uses C<PadWalker> to find the lexicals supplied as arguments in a scope
above the current one and then displays them using F<dumpvar.pl>.

=head3 COMMANDS NOT WORKING AFTER PROGRAM ENDS

All of the commands below this point don't work after the program being
debugged has ended. All of them check to see if the program has ended; this
allows the commands to be relocated without worrying about a 'line of
demarcation' above which commands can be entered anytime, and below which
they can't.

lib/perl5db.pl  view on Meta::CPAN

        $prefix = substr $text, 0, 1;
        $text   = substr $text, 1;

        my @out;

=pod

=item *

We look for the lexical scope above DB::DB and auto-complete lexical variables
if PadWalker could be loaded.

=cut

        if (not $text =~ /::/ and eval {
            local @INC = @INC;
            pop @INC if $INC[-1] eq '.';
            require PadWalker } ) {
            my $level = 1;
            while (1) {
                my @info = caller($level);
                $level++;
                $level = -1, last
                  if not @info;
                last if $info[3] eq 'DB::DB';
            }
            if ($level > 0) {
                my $lexicals = PadWalker::peek_my($level);
                push @out, grep /^\Q$prefix$text/, keys %$lexicals;
            }
        }

=pod

=item *

If the package is C<::> (C<main>), create an empty list; if it's something else, create a list of all the packages known.  Append whichever list to a list of all the possible symbols in the current package. C<grep> out the matches to the text entered...

pod/perl58delta.pod  view on Meta::CPAN

=item *

The debugger has a new C<dumpDepth> option to control the maximum
depth to which nested structures are dumped.  The C<x> command has
been extended so that C<x N EXPR> dumps out the value of I<EXPR> to a
depth of at most I<N> levels.

=item *

The debugger can now show lexical variables if you have the CPAN
module PadWalker installed.

=item *

The order of DESTROYs has been made more predictable.

=item *

Perl 5.6.0 could emit spurious warnings about redefinition of
dl_error() when statically building extensions into perl.
This has been corrected. [561]

pod/perldebug.pod  view on Meta::CPAN

X<debugger command, X>

Same as C<V currentpackage [vars]>.

=item y [level [vars]]
X<debugger command, y>

Display all (or some) lexical variables (mnemonic: C<mY> variables)
in the current scope or I<level> scopes higher.  You can limit the
variables that you see with I<vars> which works exactly as it does
for the C<V> and C<X> commands.  Requires the L<PadWalker> module
version 0.08 or higher; will warn if this isn't installed.  Output
is pretty-printed in the same style as for C<V> and the format is
controlled by the same options.

=item T
X<debugger command, T> X<backtrace> X<stack, backtrace>

Produce a stack backtrace.  See below for details on its output.

=item s [expr]

pod/perldebug.pod  view on Meta::CPAN


As shipped, the only command-line history supplied is a simplistic one
that checks for leading exclamation points.  However, if you install
the L<Term::ReadKey> and one of the C<Term::ReadLine::*> modules from CPAN (such as
L<Term::ReadLine::Gnu>, L<Term::ReadLine::Perl>, ...) you will
have full editing capabilities much like those GNU I<readline>(3) provides.
Look for these in the F<modules/by-module/Term> directory on CPAN.
These do not support normal B<vi> command-line editing, however.

A rudimentary command-line completion is also available, including
lexical variables in the current scope if the L<PadWalker> module
is installed.

Without Readline support you may see the symbols "^[[A", "^[[C", "^[[B",
"^[[D"", "^H", ... when using the arrow keys and/or the backspace key.

=head2 Editor Support for Debugging

If you have the GNU's version of B<emacs> installed on your system,
it can interact with the Perl debugger to provide an integrated
software development environment reminiscent of its interactions

t/porting/known_pod_issues.dat  view on Meta::CPAN

NgxQueue
nl_langinfo(3)
Number::Format
Object::Accessor
Object::InsideOut
open(2)
OS2::Proc
OS2::WinObject
Package::Constants
Padre
PadWalker
Parse::Keyword
passwd(1)
pclose(3)
perl(1)
Perl4::CoreLibs
perl5198delta
Perl::Unsafe::Signals
perlbug(1)
PerlIO::locale
PerlIO::Util



( run in 1.726 second using v1.01-cache-2.11-cpan-05444aca049 )