quiet warning: Subroutine Net::Ping::External::_ping_linux redefined
[freeside.git] / FS / FS / Mason.pm
index ac11026..877864e 100644 (file)
@@ -52,6 +52,7 @@ Initializes the Mason environment, loads all Freeside and RT libraries, etc.
   use Date::Format;
   use Date::Parse;
   use Time::Local;
+  use Time::HiRes;
   use Time::Duration;
   use DateTime;
   use DateTime::Format::Strptime;
@@ -77,6 +78,19 @@ Initializes the Mason environment, loads all Freeside and RT libraries, etc.
   use Spreadsheet::WriteExcel;
   use Business::CreditCard 0.30; #for mask-aware cardtype()
   use NetAddr::IP;
+  use Net::Ping;
+  use Net::Ping::External;
+  #if CPAN #7815 ever gets fixed# if ( $Net::Ping::External::VERSION <= 0.12 )
+  {
+    no warnings 'redefine';
+    eval 'sub Net::Ping::External::_ping_linux { 
+            my %args = @_;
+            my $command = "ping -s $args{size} -c $args{count} -w $args{timeout} $args{host}";
+            return Net::Ping::External::_ping_system($command, 0);
+          }
+         ';
+    die $@ if $@;
+  }
   use String::Approx qw(amatch);
   use Chart::LinesPoints;
   use Chart::Mountain;
@@ -186,6 +200,18 @@ Initializes the Mason environment, loads all Freeside and RT libraries, etc.
   use FS::part_pkg_taxrate;
   use FS::tax_rate;
   use FS::part_pkg_report_option;
+  use FS::cust_attachment;
+  use FS::h_cust_pkg;
+  use FS::h_svc_acct;
+  use FS::h_svc_broadband;
+  use FS::h_svc_domain;
+  #use FS::h_domain_record;
+  use FS::h_svc_external;
+  use FS::h_svc_forward;
+  use FS::h_svc_phone;
+  #use FS::h_phone_device;
+  use FS::h_svc_www;
+  use FS::cust_statement;
   # Sammath Naur
 
   if ( %%%RT_ENABLED%%% ) {
@@ -223,7 +249,7 @@ Initializes the Mason environment, loads all Freeside and RT libraries, etc.
 
       #slow, unreliable, segfaults and is optional
       #see rt/html/Ticket/Elements/ShowTransactionAttachments
-      #use Text::Quoted;
+      use Text::Quoted;
 
       #?#use File::Path qw( rmtree );
       #?#use File::Glob qw( bsd_glob );