develooper Front page | perl.perl6.language | Postings from July 2005

$value.confess()

From:
Brent 'Dax' Royal-Gordon
Date:
July 28, 2005 13:11
Subject:
$value.confess()
Message ID:
b8b9a51105072813113f658a3f@mail.gmail.com
While trying to track down a type error in a Pugs program today, I
thought of what could be a handy debugging feature.

I would like Perl 6 values to capture the call stack when they're
created and store them into a property called "confess" (Autrijus's
name).  $value.confess would then return an array of Caller objects,
which could be inspected to determine where a value came from.  It
might even be wise to have it capture the call stack each time the
value is mutated.

Since this would likely be expensive, I suspect it should be optional
and turned off by default; however, this would probably be a global
setting, not a lexical one.

-- 
Brent 'Dax' Royal-Gordon <brent@brentdax.com>
Perl and Parrot hacker



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About