# $Id: cliprocs.pm,v 1.8 1997/05/01 22:06:57 jake Exp $ # Copyright 1997 Jake Donham # You may distribute under the terms of either the GNU General # Public License or the Artistic License, as specified in the README # file. # cliprocs takes a module name and a filehandle reference and prints XS # stubs for client procedures to the filehandle. sub RPCL::Syntax::cliprocs {} sub RPCL::ProgramDef::cliprocs { my ($self, $mod, $fh) = @_; foreach $ver (@{$self->versions}) { $ver->cliprocs($mod, $fh); } } sub RPCL::Version::cliprocs { my ($self, $mod, $fh) = @_; foreach $proc (@{$self->procedures}) { $proc->cliprocs($mod, $self->value, $fh); } } sub RPCL::Procedure::cliprocs { my ($self, $mod, $version, $fh) = @_; my $ret = $self->rettype->perltype($mod); my $arg = $self->argtype->perltype($mod); my $proc = lc($self->ident) . '_' . $version; my $argref = $self->argtype->ref; my $retderef = $self->rettype->deref; if ($ret eq 'void') { if ($arg eq 'void') { print $fh <