X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FMason.pm;h=3ab8aeb4d74be3947f54ea66c2438c392505f91e;hb=0141b002ab937b2b3a21a92c3728bc3101f4668a;hp=651cc95a462289ca6f7d25dd3936bfbb4b3312ba;hpb=06809c379e25e6753d39ca79a39c977e5194c696;p=freeside.git diff --git a/FS/FS/Mason.pm b/FS/FS/Mason.pm index 651cc95a4..3ab8aeb4d 100644 --- a/FS/FS/Mason.pm +++ b/FS/FS/Mason.pm @@ -150,7 +150,8 @@ if ( -e $addl_handler_use_file ) { use FS::Report::Table; use FS::Report::Table::Monthly; use FS::Report::Table::Daily; - use FS::Report::Tax; + use FS::Report::Tax::ByName; + use FS::Report::Tax::All; use FS::TicketSystem; use FS::NetworkMonitoringSystem; use FS::Tron qw( tron_lint ); @@ -391,6 +392,7 @@ if ( -e $addl_handler_use_file ) { use FS::fiber_olt; use FS::olt_site; use FS::access_user_page_pref; + use FS::part_svc_msgcat; # Sammath Naur if ( $FS::Mason::addl_handler_use ) { @@ -462,7 +464,7 @@ if ( -e $addl_handler_use_file ) { use vars qw($m); # false laziness w/below - if ( defined(@DBIx::Profile::ISA) ) { + if ( @DBIx::Profile::ISA ) { if ( $FS::CurrentUser::CurrentUser->option('show_db_profile') ) { @@ -522,7 +524,7 @@ if ( -e $addl_handler_use_file ) { use vars qw($m); $m->clear_buffer; #false laziness w/above - if ( defined(@DBIx::Profile::ISA) ) { + if ( @DBIx::Profile::ISA ) { if ( $FS::CurrentUser::CurrentUser->option('show_db_profile') ) { @@ -560,7 +562,7 @@ if ( -e $addl_handler_use_file ) { } # end package HTML::Mason::Commands; -=head1 SUBROUTINE +=head1 SUBROUTINES =over 4 @@ -655,6 +657,35 @@ sub mason_interps { } +=item child_init + +Per-process Apache child initialization code. + +Calls srand() to re-seed Perl's PRNG so that multiple children do not generate +the same "random" numbers. + +Works around a Net::SSLeay connection error by creating and deleting an SSL +context, so subsequent connections do not error out with a CTX_new (900 NET OR +SSL ERROR). + +=cut + +sub child_init { + #my ($pool, $server) = @_; #the child process pool (APR::Pool) and the server object (Apache2::ServerRec). + + srand(); + + #{ + use Net::SSLeay; + package Net::SSLeay; + initialize(); + my $bad_ctx = new_x_ctx(); + while ( ERR_get_error() ) {}; #print_errs('CTX_new'); + CTX_free($bad_ctx); + #} + +} + =back =head1 BUGS