[vhffs-dev] [1682] Use require instead of use to decrease resource usage.

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 1682
Author:   beuss
Date:     2011-05-01 16:25:51 +0200 (Sun, 01 May 2011)
Log Message:
-----------
Use require instead of use to decrease resource usage.

Modified Paths:
--------------
    trunk/vhffs-api/src/Vhffs/Panel/Main.pm

Modified: trunk/vhffs-api/src/Vhffs/Panel/Main.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Main.pm	2011-05-01 14:25:44 UTC (rev 1681)
+++ trunk/vhffs-api/src/Vhffs/Panel/Main.pm	2011-05-01 14:25:51 UTC (rev 1682)
@@ -25,20 +25,6 @@
 use Vhffs::Panel::Commons;
 use Vhffs::Panel::Admin;
 
-use Vhffs::Panel::Cvs;
-use Vhffs::Panel::DNS;
-use Vhffs::Panel::Mail;
-use Vhffs::Panel::MailingList;
-use Vhffs::Panel::Mysql;
-use Vhffs::Panel::Pgsql;
-use Vhffs::Panel::Repository;
-use Vhffs::Panel::Svn;
-use Vhffs::Panel::Git;
-use Vhffs::Panel::Mercurial;
-use Vhffs::Panel::Bazaar;
-use Vhffs::Panel::Web;
-use Vhffs::Panel::Cron;
-
 =pod
 
 =head1 NAME
@@ -540,66 +526,79 @@
 	}
 
         if($config->get_service_availability('web')) {
+            require Vhffs::Panel::Web;
             my $webs = Vhffs::Panel::Web::getall_per_group( $vhffs, $gid );
             $services_list .= $panel->create_service_index('web', $webs)->output;
         }
 
         if($config->get_service_availability('mysql')) {
+            require Vhffs::Panel::Mysql;
             my $mysql = Vhffs::Panel::Mysql::getall_per_group( $vhffs, $gid );
             $services_list .= $panel->create_service_index('mysql', $mysql)->output;
         }
 
         if($config->get_service_availability('pgsql')) {
+            require Vhffs::Panel::Pgsql;
             my $pg = Vhffs::Panel::Pgsql::getall_per_group( $vhffs, $gid );
             $services_list .= $panel->create_service_index('pgsql', $pg)->output;
         }
 
         if($config->get_service_availability('cvs')) {
+            require Vhffs::Panel::Cvs;
             my $cvs = Vhffs::Panel::Cvs::getall_per_group( $vhffs, $gid );
             $services_list .= $panel->create_service_index('cvs', $cvs)->output;
         }
 
         if($config->get_service_availability('svn')) {
+            require Vhffs::Panel::Svn;
             my $svn = Vhffs::Panel::Svn::getall_per_group( $vhffs, $gid );
             $services_list .= $panel->create_service_index('svn', $svn)->output;
         }
 
         if($config->get_service_availability('git')) {
+            require Vhffs::Panel::Git;
             my $git = Vhffs::Panel::Git::getall_per_group( $vhffs, $gid );
             $services_list .= $panel->create_service_index('git', $git)->output;
         }
 
         if($config->get_service_availability('mercurial')) {
+            require Vhffs::Panel::Mercurial;
             my $mercurial = Vhffs::Panel::Mercurial::getall_per_group( $vhffs, $gid );
             $services_list .= $panel->create_service_index('mercurial', $mercurial)->output;
         }
 
         if($config->get_service_availability('bazaar')) {
+            require Vhffs::Panel::Bazaar;
             my $bazaar = Vhffs::Panel::Bazaar::getall_per_group( $vhffs, $gid );
             $services_list .= $panel->create_service_index('bazaar', $bazaar)->output;
         }
 
         if($config->get_service_availability('mailinglist')) {
+            require Vhffs::Panel::MailingList;
             my $ml = Vhffs::Panel::MailingList::getall_per_group( $vhffs, $gid );
             $services_list .= $panel->create_service_index('mailinglist', $ml)->output;
         }
 
         if($config->get_service_availability('mail')) {
+            require Vhffs::Panel::Mail;
             my $mail = Vhffs::Panel::Mail::getall_per_group( $vhffs, $gid );
             $services_list .= $panel->create_service_index('mail', $mail)->output;
         }
 
         if($config->get_service_availability('repository')) {
+            require Vhffs::Panel::Repository;
             my $repos = Vhffs::Panel::Repository::getall_per_group( $vhffs, $gid );
             $services_list .= $panel->create_service_index('repository', $repos)->output;
         }
 
         if($config->get_service_availability('dns')) {
+            require Vhffs::Panel::DNS;
             my $dns = Vhffs::Panel::DNS::getall_per_group( $vhffs, $gid );
             $services_list .= $panel->create_service_index('dns', $dns)->output;
         }
 
         if($config->get_service_availability('cron')) {
+            require Vhffs::Panel::Cron;
             my $cron = Vhffs::Panel::Cron::getall_per_group( $vhffs, $gid );
             $services_list .= $panel->create_service_index('cron', $cron)->output;
         }


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/