freeside/FS/FS ClientAPI.pm,1.3,1.4
ivan
ivan at pouncequick.420.am
Sat Feb 5 15:39:46 PST 2005
- Previous message: freeside/FS/FS/ClientAPI Agent.pm,1.4,1.5 MyAccount.pm,1.32,1.33 Signup.pm,1.19,1.20 passwd.pm,1.5,1.6
- Next message: freeside/httemplate/docs upgrade10.html,1.38,1.39 schema.html,1.46,1.47 install.html,1.80,1.81
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
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}(@_);
}
- Previous message: freeside/FS/FS/ClientAPI Agent.pm,1.4,1.5 MyAccount.pm,1.32,1.33 Signup.pm,1.19,1.20 passwd.pm,1.5,1.6
- Next message: freeside/httemplate/docs upgrade10.html,1.38,1.39 schema.html,1.46,1.47 install.html,1.80,1.81
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list