Show quoted text> Sounds good :-)
Okay. Do you want to do a pull request, or do you want me to tackle it?
Show quoted text> It's really a small detail, It's just one line:
>
> use Debuggit;
> sub dbg { debuggit(@_) };
Well, that would probably be better expressed as:
sub dbg { goto &debuggit }
but it's still an extra function call for no good reason, when we're just going to install the thing in the symbol table anyway. So we may as well install it with the name that the user wants. :-)
Show quoted text> Something else: i'm doing this, do you think it's a good practice?
>
> use Debuggit DEBUG => %ENV{DEBUG}
Presuming you mean $ENV{DEBUG} here. Unless you're using Perl 6. ;->
Having Debuggit pull from an environment variable is one of those things I've always thought was a good idea to add; I just never personally had the need, so I never have. I noted in my comparison matrix that several other modules have that feature. And it would be fairly trivial to add. I would probably go with something like `DEBUGGIT_DEBUG` as the env var.
I would definitely consider a pull request along these lines.
Show quoted text> and then i have these two aliases:
> alias p ='export DEBUG=0 && perl' # to launch a script without
> debug
> alias p1='export DEBUG=1 && perl' # to launch with debug statements
If I remember my bash correctly, you should be able to do just
alias p1='DEBUG=1 perl'
and that should set the var just for the one command. Then you wouldn't have to worry about resetting it with another alias.
If you want to do a pull request, please do add some failing tests first. That always makes the process go faster.
I'm glad you're finding Debuggit useful! Keep the ideas coming. :-)