Sergey Aleynikov > Devel-PrettyTrace-0.04 > Devel::PrettyTrace

Download:
Devel-PrettyTrace-0.04.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.04   Source  

NAME ^

Devel::PrettyTrace - prints stack traces with arguments expanded into readable format

SYNOPSIS ^

    use Devel::PrettyTrace;
        
        sub foo{
                bar();
        }

        sub bar{
                bt;
        }

        foo(1, "b");

        #and you get
        
        main::bar() called at foo.pl line 4
        main::foo(
        [0] 1,
                [1] "b"
        ) called at foo.pl line 10

DESCRIPTION ^

This module allows you to see detailed and pretty formatted stack straces of perl functions call. It exports a single function - bt. In void context, it sends it's output to STDERR. In scalar context, it returns you collected data as string.

CONFIGURATION ^

$Indent

This string is appended to each line of output. Defaults to ' ' (two spaces).

$Evalen

How many symbols of a string eval to print. Defaults to 40.

$Deeplimit

How many call frames to go up. Defaults to 0 (unlimited).

$Skiplevels

How many calls up of the current frame to start printing. Defaults to 0 (do not skip anything).

%IgnorePkg

Functions in a packages that are hash keys of %IgnorePkg are not shown in the stack trace output.

%Opts

Options for Data::Printer, that determine how to render arguments. If you need special formatting, do it here.

AUTHOR ^

Sergey Aleynikov <sergey.aleynikov@gmail.com>

LICENSE ^

Copyright (c) 2011 by Sergey Aleynikov. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

syntax highlighting: