From cdc06cc3e2c4670d3cd46b0a03adcf7e6958eff1 Mon Sep 17 00:00:00 2001 From: Peter Bray Date: Mon, 25 Jul 2005 01:47:15 +0000 Subject: [1185704] New Testing Infrastructure. Complete rewrite of the original testing infrastructure and all test cases (to use the new infrastructure) See NPTest.pm and issue 1185704 for more details. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1207 f882894a-f735-0410-b71e-b25c423dba1c --- Helper.pm | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 Helper.pm (limited to 'Helper.pm') diff --git a/Helper.pm b/Helper.pm deleted file mode 100644 index 198a6480..00000000 --- a/Helper.pm +++ /dev/null @@ -1,44 +0,0 @@ -package Helper; -use strict; - -use Exporter(); -use vars qw($VERSION @ISA @EXPORT); -$VERSION = 0.01; -@ISA=qw(Exporter); -@EXPORT=qw(&get_option); - -sub get_option ($$) { - my $file = 'Cache'; - my $response; - my $var = shift; - - require "$file.pm"; - if(defined($Cache::{$var})){ - $response=$Cache::{$var}; - return $$response; - } - - my $request = shift; - my $filename; - my $path; - foreach $path (@INC) { - $filename="$path/$file.pm"; - last if (-e $filename); - } - print STDERR "Enter $request\n"; - $response=; - chop($response); - open(CACHE,"<$filename") or die "Cannot open cache for reading"; - undef $/; - my $cache = ; - $/="\n"; - close CACHE; - $cache =~ s/^(\@EXPORT\s*=\s*qw\(\s*[^\)]*)\)\s*;/$1 $var\)\;/msg; - $cache =~ s/^1;[\n\s]*\Z/\$$var=\"$response\"\;\n1\;\n/msg; - open(CACHE,">$filename") or die "Cannot open cache for writing"; - print CACHE $cache; - close CACHE; - return $response; -} - -1; -- cgit v1.2.3-74-g34f1