Dan Sully;148903 Wrote:
> * gerph shaped the electrons to say...
>
> > [1915] $log->debug("..Trying to match [$match]");
> > [1916] $log->debug(Data::Dump::dump($DBp));
>
> Thanks - Triode just noticed this as well. Thanks for narrowing it
> down.
>
> Just checked in a fix - see how it works for you.
As expected the new trunk works great; thanks!
Dan Sully;148903 Wrote:
>
> > $log->debug("..Trying to match [$match]"); # string is always fast
> to generate
> > $log->debugcallback(sub { return Data::Dump::dump($DBp); }); # The
> dump is AMAZINGLY slow, so we generate only if needed
>
> There are a number of ways you could fix it, and you're close with
> that.
>
> $log->debug(sub { return Data::Dump::dump($DBp) });
>
> Is one way to do it. sub {} will generate an anonymous closure, so $DBp
> would be properly scoped.
>
> The other way is to check for $log->is_debug and conditionally call
> expensive debugging.
>
Neat. Thanks for the quick fix.
--
gerph
------------------------------------------------------------------------
gerph's Profile: http://forums.slimdevices.com/member.php?userid=1819
View this thread: http://forums.slimdevices.com/showthread.php?t=28960
_______________________________________________
beta mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/beta