Skip Menu |

This queue is for tickets about the System-Command CPAN distribution.

Report information
The Basics
Id: 106048
Status: open
Priority: 0/
Queue: System-Command

People
Owner: Nobody in particular
Requestors: TIMB [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Subclasses like Git::Repository::Command can't make use of trace facilities
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.
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.