diff options
author | ivan <ivan> | 2011-01-25 03:14:42 +0000 |
---|---|---|
committer | ivan <ivan> | 2011-01-25 03:14:42 +0000 |
commit | 40d1e71653e1a0021021d9d3f7f7705cf9df4d61 (patch) | |
tree | 6bfc15c30b93704e389ee939f800a1b0b8ee1c2c /FS/FS/NetworkMonitoringSystem.pm | |
parent | 2c53505237b44980a578c9df707b6708402ead1b (diff) |
torrus, 10574
Diffstat (limited to 'FS/FS/NetworkMonitoringSystem.pm')
-rw-r--r-- | FS/FS/NetworkMonitoringSystem.pm | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/FS/FS/NetworkMonitoringSystem.pm b/FS/FS/NetworkMonitoringSystem.pm new file mode 100644 index 000000000..c16d5fe57 --- /dev/null +++ b/FS/FS/NetworkMonitoringSystem.pm @@ -0,0 +1,28 @@ +package FS::NetworkMonitoringSystem; + +use strict; +use vars qw( $conf $system $AUTOLOAD ); +use FS::Conf; +use FS::UID; + +FS::UID->install_callback( sub { + $conf = new FS::Conf; + $system = $conf->config('network_monitoring_system'); +} ); + +sub AUTOLOAD { + my $self = shift; + + my($sub)=$AUTOLOAD; + $sub =~ s/.*://; + + my $conf = new FS::Conf; + die "FS::NetworkMonitoringSystem::$AUTOLOAD called, but none configured\n" + unless $system; + + eval "use FS::NetworkMonitoringSystem::$system;"; + die $@ if $@; + + $self .= "::$system"; + $self->$sub(@_); +} |