has 'log_message' => ( isa => 'Str', is => 'ro', writer => '_set_log_message', clearer => '_clear_log_message' ); sub commit { my ($self, $msg, @args) = @_; print STDERR "COMMIT CALLED WITH MSG ($msg)\n"; print STDERR "CURRENT MSG (".$self->log_message.")\n"; $self->set_log_message($msg) if defined $msg; my $new_msg = $self->log_message; print STDERR "NEW MSG (".$new_msg.")\n"; use Data::Dumper; print STDERR "DUMPED NEW MSG:".Dumper $new_msg; return $self->client_obj->commit(@args); } sub set_log_message { my ($self, $msg) = @_; $self->_set_log_message($msg); } sub log_message_callback { my $self = shift; my $log_msg = $self->log_message; use Data::Dumper; print STDERR "0 RETURNING (".$self->log_message.")\n"; print STDERR "1 RETURNING ($log_msg)\n"; print STDERR "LOG DUMP1:".Dumper $log_msg; print STDERR "LOG DUMP2:".Dumper $self; $_[0] = \$log_msg; $self->_clear_log_message; } #### COMMIT CALLED WITH MSG (Committing new plist file revisions.) CURRENT MSG () NEW MSG (Committing new plist file revisions.) DUMPED NEW MSG:$VAR1 = 'Committing new plist file revisions.'; 0 RETURNING (Committing new plist file revisions.) 1 RETURNING (*SVN::Handle::Committing new plist file revisions.) LOG DUMP1:$VAR1 = *{'SVN::Handle::Committing new plist file revisions.'}; LOG DUMP2:$VAR1 = bless( { 'client_obj' => bless( { 'ctx' => bless( do{\(my $o = 30042304)}, '_p_svn_client_ctx_t' ), 'auth_provider_callbacks' => [ \sub { "DUMMY" } ], 'pool' => bless( do{\(my $o = bless( do{\(my $o = 187060184)}, '_p_apr_pool_t' ))}, 'SVN::Pool' ), 'log_msg_callback' => \sub { "DUMMY" } }, 'SVN::Client' ), 'log_message' => 'Committing new plist file revisions.', 'base_url' => 'https://subversion.jf.intel.com/iag/mgd/prmd/mtd/tpt/Rapttr/', 'repo_name' => 'rapttr_svn' }, 'SVN::Handle::RapTTR' ); #### my $log_msg = $self->log_message; print STDERR "0 RETURNING (".$self->log_message.")\n"; print STDERR "1 RETURNING ($log_msg)\n"; # and output 0 RETURNING (Committing new plist file revisions.) 1 RETURNING (*SVN::Handle::Committing new plist file revisions.)