On Thu Jul 23 07:31:11 2015, TIMB wrote:
Show quoted text> There's no way to check if tracing is enabled, or to output to the
> trace.
> Perhaps add trace() and do_trace() class methods as wrappers for
> $trace and $_do_trace.
The issue I have with tracing is when a file name is provided. Given that System::Command and Git::Repository do chdir() quite easily, a non-absolute
file name will end up dropping trace files all over the place.
This is why System::Command is reading the trace information from the
environment at startup, and reusing it afterwards.
I started to provide a do_trace method (that would use whatever was defined
when the System::Command object was created), but I ran into two issues:
- the first one was that I was re-reading the environment during the
call to new (instead of at startup)
- the second one was that do_trace is called before the object is even
blessed...
I'm leaving this ticket open for now, so that we can continue this conversation and that I can figure out how to handle this.