From 40d1e71653e1a0021021d9d3f7f7705cf9df4d61 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 25 Jan 2011 03:14:42 +0000 Subject: torrus, 10574 --- FS/FS/NetworkMonitoringSystem.pm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 FS/FS/NetworkMonitoringSystem.pm (limited to 'FS/FS/NetworkMonitoringSystem.pm') diff --git a/FS/FS/NetworkMonitoringSystem.pm b/FS/FS/NetworkMonitoringSystem.pm new file mode 100644 index 0000000..c16d5fe --- /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(@_); +} -- cgit v1.1