first pass at VoIP rating
[freeside.git] / htetc / handler.pl
index d425c22..81c9836 100644 (file)
@@ -98,6 +98,10 @@ sub handler
       use IO::Handle;
       use IO::File;
       use Net::Whois::Raw qw(whois);
+      if ( $] < 5.006 ) {
+        eval "use Net::Whois::Raw 0.32 qw(whois)";
+        die $@ if $@;
+      }
       use Business::CreditCard;
       use String::Approx qw(amatch);
       use Chart::LinesPoints;
@@ -150,6 +154,9 @@ sub handler
       use FS::part_export_option;
       use FS::export_svc;
       use FS::msgcat;
+      use FS::rate;
+      use FS::rate_region;
+      use FS::rate_prefix;
 
       if ( %%%RT_ENABLED%%% ) {
         eval '
@@ -204,11 +211,14 @@ sub handler
         }
 
       };
+      
+      unless ( $HTML::Mason::r->filename =~ /\/rt\/.*NoAuth/ ) { #RT
+        $cgi = new CGI;
+        &cgisuidsetup($cgi);
+        #&cgisuidsetup($r);
+        $p = popurl(2);
+      }
 
-      $cgi = new CGI;
-      &cgisuidsetup($cgi);
-      #&cgisuidsetup($r);
-      $p = popurl(2);
 
       sub include {
         use vars qw($m);