Second, you are not setting the log message properly. Since, as the documentation says, the first parameter is a reference to a scalar that should get the log message, you should be doing
(Don't put the leading ampersand on a subroutine call; this makes Perl do funny things like ignore prototypes, none of which you care about, but which could bite you at a later date. Just get out of the habit of using & on subroutines unless you're creating references to them.)${ $log_msg } = message();
Your code as it stands seems to want to read standard input, write it to a file, and then read that back in again to set the log message. This could be loads simpler - just read it once, write it out, and then take the copy you already have to set the message:
If there was some reason that you might get an error, then you'd returnopen my $fh, '>>', $filename or die "Can't open $filename for appe +nd: $!"; my @lines = <STDIN>; print $fh @lines; close $fh; ${ $log_msg } = join("", @lines); return;
$apr_err is documented in there somewhere, not sure where though. The default error handler should be sufficient unless you want to do something like trap errors writing to the log via eval and pass back a specific "hey, I can't log the message" error.return SVN::Error::create($apr_err, $child, $message);
Leave $citem alone; you can do everything you want with just the $log_msg reference. I found all this poking at SVN::Core and SVN::Client - this much should get you considerably further than you are now.
In reply to Re^3: SVN API log_msg help
by pemungkah
in thread Reaped: SVN API log_msg help
by NodeReaper
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |