Skip to content

Commit

Permalink
Reserve spot for prototype spec
Browse files Browse the repository at this point in the history
  • Loading branch information
gisle committed Jan 2, 2009
1 parent 2c06f76 commit 9f61a3a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/Data/Dump/Trace.pm
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ sub wrap {
my $func = $arg{func};

return sub {
call($name, $func, @_);
call($name, $func, undef, @_);
} if $func;

if (my $obj = $arg{obj}) {
Expand All @@ -63,6 +63,7 @@ sub wrap {
sub call {
my $name = shift;
my $func = shift;
my $proto = shift;
print YELLOW, $name, dumpav(@_), RESET;
if (!defined wantarray) {
print "\n";
Expand All @@ -79,6 +80,7 @@ sub call {
sub mcall {
my $o = shift;
my $method = shift;
my $proto = shift;
my $oname = ref($o) ? $obj_name{overload::StrVal($o)} || "\$o" : $o;
print YELLOW, $oname, "->", $method, @_ ? dumpav(@_) : "", RESET;
if (!defined wantarray) {
Expand Down Expand Up @@ -117,7 +119,7 @@ sub AUTOLOAD {
my $self = shift;
our $AUTOLOAD;
my $method = substr($AUTOLOAD, rindex($AUTOLOAD, '::')+2);
Data::Dump::Trace::mcall($self->{obj}, $method, @_);
Data::Dump::Trace::mcall($self->{obj}, $method, undef, @_);
}

1;

0 comments on commit 9f61a3a

Please sign in to comment.