home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / perl5 / auto / RPC / XML / Procedure / delete_signature.al < prev    next >
Encoding:
Text File  |  2008-11-04  |  1.1 KB  |  38 lines

  1. # NOTE: Derived from blib/lib/RPC/XML/Procedure.pm.
  2. # Changes made here will be lost when autosplit is run again.
  3. # See AutoSplit.pm.
  4. package RPC::XML::Procedure;
  5.  
  6. #line 704 "blib/lib/RPC/XML/Procedure.pm (autosplit into blib/lib/auto/RPC/XML/Procedure/delete_signature.al)"
  7. sub delete_signature
  8. {
  9.     my $self = shift;
  10.     my @args = @_;
  11.  
  12.     my (%sigs, $one_sig, $tmp, $old);
  13.  
  14.     # Preserve the original in case adding the new one causes a problem
  15.     $old = $self->{signature};
  16.     %sigs = map { $_ => 1 } @{$self->{signature}};
  17.     for $one_sig (@args)
  18.     {
  19.         $tmp = (ref $one_sig) ? join(' ', @$one_sig) : $one_sig;
  20.         delete $sigs{$tmp};
  21.     }
  22.     $self->{signature} = [ keys %sigs ];
  23.     unless (ref($tmp = $self->make_sig_table))
  24.     {
  25.         # Because this failed, we have to restore the old table and return
  26.         # an error
  27.         $self->{signature} = $old;
  28.         $self->make_sig_table;
  29.         return ref($self) . '::delete_signature: Error re-hashing table: ' .
  30.             $tmp;
  31.     }
  32.  
  33.     $self;
  34. }
  35.  
  36. # end of RPC::XML::Procedure::delete_signature
  37. 1;
  38.