Data::Dump::Trace(3) | User Contributed Perl Documentation | Data::Dump::Trace(3) |
Data::Dump::Trace - Helpers to trace function and method calls
use Data::Dump::Trace qw(autowrap mcall); autowrap("LWP::UserAgent" => "ua", "HTTP::Response" => "res"); use LWP::UserAgent; $ua = mcall(LWP::UserAgent => "new"); # instead of LWP::UserAgent->new; $ua->get("http://www.example.com")->dump;
The following functions are provided:
Alternative is to pass an %info hash for each class. The recognized keys are:
See "Prototypes" for description of the "proto" argument.
See "Prototypes" for description of the $proto argument.
See "Prototypes" for description of the $proto argument.
Note: The prototype string syntax described here is experimental and likely to change in revisions of this interface.
The $proto argument to call() and mcall() can optionally provide a prototype for the function call. This give the tracer hints about how to best format the argument lists and if there are in/out or out arguments. The general form for the prototype string is:
<arguments> = <return_value>
The default prototype is "@ = @"; list of values as input and list of values as output.
The value '%' can be used for both arguments and return value to say that key/value pair style lists are used.
Alternatively, individual positional arguments can be listed each represented by a letter:
If the return value prototype has "!" appended, then it signals that this function sets errno ($!) when it returns a false value. The trace will display the current value of errno in that case.
If the return value prototype looks like a variable name (with "$" prefix), and the function returns a blessed object, then the variable name will be used as prefix and the returned object automatically traced.
Data::Dump
Copyright 2009 Gisle Aas.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
2013-05-16 | perl v5.34.0 |