package FS::ClientAPI;
use strict;
-use vars qw(%handler $domain);
+use vars qw(%handler $domain $DEBUG);
+
+$DEBUG = 1;
%handler = ();
#find modules
foreach my $INC ( @INC ) {
- foreach my $file ( glob("$INC/FS/ClientAPI/*.pm") ) {
+ my $glob = "$INC/FS/ClientAPI/*.pm";
+ warn "FS::ClientAPI: searching $glob" if $DEBUG;
+ foreach my $file ( glob($glob) ) {
$file =~ /\/(\w+)\.pm$/ or do {
warn "unrecognized ClientAPI file: $file";
next
};
my $mod = $1;
- #warn "using FS::ClientAPI::$mod";
+ warn "using FS::ClientAPI::$mod" if $DEBUG;
eval "use FS::ClientAPI::$mod;";
die "error using FS::ClientAPI::$mod: $@" if $@;
}
use FS::agent;
use FS::cust_main qw(smart_search);
-use FS::ClientAPI;
+#use FS::ClientAPI;
FS::ClientAPI->register_handlers(
'Agent/agent_login' => \&agent_login,
'Agent/agent_logout' => \&agent_logout,
use FS::cust_main_county;
use FS::cust_pkg;
-use FS::ClientAPI; #hmm
+#use FS::ClientAPI; #hmm
FS::ClientAPI->register_handlers(
'MyAccount/login' => \&login,
'MyAccount/logout' => \&logout,
use FS::queue;
use FS::reg_code;
-use FS::ClientAPI; #hmm
+#use FS::ClientAPI; #hmm
FS::ClientAPI->register_handlers(
'Signup/signup_info' => \&signup_info,
'Signup/new_customer' => \&new_customer,
use FS::svc_acct;
use FS::svc_domain;
-use FS::ClientAPI; #hmm
+#use FS::ClientAPI; #hmm
FS::ClientAPI->register_handlers(
'passwd/passwd' => \&passwd,
'passwd/chfn' => \&chfn,