fix leakage of v4 omission of cust_main.payby onto v3, RT#34084, RT#23741
[freeside.git] / FS / FS / NetworkMonitoringSystem.pm
1 package FS::NetworkMonitoringSystem;
2
3 use strict;
4 use vars qw( $conf $system $AUTOLOAD );
5 use FS::Conf;
6 use FS::UID;
7
8 FS::UID->install_callback( sub { 
9   $conf = new FS::Conf;
10   $system = $conf->config('network_monitoring_system');
11 } );
12
13 sub AUTOLOAD {
14   my $self = shift;
15
16   my($sub)=$AUTOLOAD;
17   $sub =~ s/.*://;
18
19   my $conf = new FS::Conf;
20   die "FS::NetworkMonitoringSystem::$AUTOLOAD called, but none configured\n"
21     unless $system;
22
23   eval "use FS::NetworkMonitoringSystem::$system;";
24   die $@ if $@;
25
26   $self .= "::$system";
27   $self->$sub(@_);
28 }
29
30 1;