Why you first assign $someObject->bar()->doSomething(); to it, then discard the result is not clear to me. Nor is it clear to me what Log4perl->debug should do with its second argument.It just was an example, because I have methodes which work like that. doSomething() provides a string, but I need a reference to that string to send it to the calle of foo. I thought my line is more readable than $retVal = \$someObject->bar()->doSomething(); or user \$retVal wherever I want the reference. The second parameter to debug is only called when Log4perl actually logs something and used in the log message. The documentation of Log4perl prefers using anonymous subs with references to data when logging large strings because the strings won't be copied if the current log level is not debug.
In reply to Re^2: unreachable memory with a non-zero reference count
by Pickwick
in thread unreachable memory with a non-zero reference count
by Pickwick
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |