freeside/FS/FS ClientAPI.pm,1.3,1.4

ivan ivan at pouncequick.420.am
Sat Feb 5 15:39:46 PST 2005


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory pouncequick:/tmp/cvs-serv8623

Modified Files:
	ClientAPI.pm 
Log Message:
remove unnecessary complication from ClientAPI dispatch foo

Index: ClientAPI.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/ClientAPI.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- ClientAPI.pm	5 Feb 2005 01:30:55 -0000	1.3
+++ ClientAPI.pm	5 Feb 2005 23:39:43 -0000	1.4
@@ -3,7 +3,7 @@
 use strict;
 use vars qw(%handler $domain $DEBUG);
 
-$DEBUG = 1;
+$DEBUG = 0;
 
 %handler = ();
 
@@ -23,24 +23,13 @@
   }
 }
 
-#(sub for modules)
-sub register_handlers {
-  my $self = shift;
-  my %new_handlers = @_;
-  foreach my $key ( keys %new_handlers ) {
-    warn "WARNING: redefining sub $key" if exists $handler{$key};
-    #warn "registering $key";
-    $handler{$key} = $new_handlers{$key};
-  }
-}
-
 #---
 
 sub dispatch {
   my ( $self, $name ) = ( shift, shift );
-  my $sub = $handler{$name}
-    or die "unknown FS::ClientAPI sub $name (known: ". join(" ", keys %handler );
-    #or die "unknown FS::ClientAPI sub $name";
+  $name =~ s(/)(::)g;
+  my $sub = "FS::ClientAPI::$name";
+  no strict 'refs';
   &{$sub}(@_);
 }
 




More information about the freeside-commits mailing list