5 use vars qw( @EXPORT_OK %handler $domain $DEBUG $me );
7 @EXPORT_OK = qw( load_clientapi_modules );
10 $me = '[FS::ClientAPI]';
14 sub load_clientapi_modules {
17 foreach my $INC ( @INC ) {
18 my $glob = "$INC/FS/ClientAPI/*.pm";
19 warn "FS::ClientAPI: searching $glob" if $DEBUG;
20 foreach my $file ( glob($glob) ) {
21 $file =~ /\/(\w+)\.pm$/ or do {
22 warn "unrecognized ClientAPI file: $file";
26 warn "using FS::ClientAPI::$mod" if $DEBUG;
27 eval "use FS::ClientAPI::$mod;";
28 die "error using FS::ClientAPI::$mod: $@" if $@;
35 my ( $self, $name ) = ( shift, shift );
37 my $sub = "FS::ClientAPI::$name";
38 warn "$me dispatch: calling $sub with args @_\n" if $DEBUG;