naresh777 has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to write a perl api function can some body help me out wethere the function which i wrote is wrong or write iam unable to figure it out. if any thing wrong please correct me .
----------------------------------------------- TYPE1 -----------------------------------------------------sub log_msg{ my $self = shift; if (scalar(@_) ==1){ $self->{'log_msg_callback'} = $self->{'ctx'}-log_msg_baton3(shift); } return ${$self->{'log_msg_callback'}}; } ------------------------------------------------------ type 2 -------------------------------------------------------- #sub message{ # ($fh, $filename) = tempfile($template, DIR => $path) # or die "Error creating $filename: $!"; #$fh= new IO::File "+>> $filename " or die " could not open a file :$! +"; #if (defined $fh){ #my $line =<STDIN>; #print $fh $line; #} #close($fh); #my $messgpath="$path/$filename"; #return $messgpath; #} # #sub log_msg{ # my $logmsg= shift; # $messgpath=shift; # my $citem = shift; #3my $pool = shift; # ##$logmsg=<STDIN>; #$citem->path("$path/passwd.txt"); #$citem->revision('HEAD'); #} ------------------------------------------------------ type 3 ----------------------------------------------------- sub log_msg #{ #my ($log,$message, $citem = {$citem->path(),$citem->kind(),$citem->ur +l(),$citem->revision('HEAD'),$citem->copyfrom_url()})=@_; #$commit_item->state_flags() #}
|
|---|