for mod_perl: no more top-level my() variables; use vars instead
authorivan <ivan>
Tue, 19 Jan 1999 05:14:23 +0000 (05:14 +0000)
committerivan <ivan>
Tue, 19 Jan 1999 05:14:23 +0000 (05:14 +0000)
also the last s/create/new/;

58 files changed:
htdocs/browse/agent.cgi
htdocs/browse/agent_type.cgi
htdocs/browse/cust_main_county.cgi
htdocs/browse/part_pkg.cgi
htdocs/browse/part_referral.cgi
htdocs/browse/part_svc.cgi
htdocs/browse/svc_acct_pop.cgi
htdocs/edit/agent.cgi
htdocs/edit/agent_type.cgi
htdocs/edit/cust_credit.cgi
htdocs/edit/cust_main.cgi
htdocs/edit/cust_main_county-expand.cgi
htdocs/edit/cust_main_county.cgi
htdocs/edit/cust_pay.cgi
htdocs/edit/cust_pkg.cgi
htdocs/edit/part_pkg.cgi
htdocs/edit/part_referral.cgi
htdocs/edit/part_svc.cgi
htdocs/edit/process/agent.cgi
htdocs/edit/process/agent_type.cgi
htdocs/edit/process/cust_credit.cgi
htdocs/edit/process/cust_main.cgi
htdocs/edit/process/cust_main_county-expand.cgi
htdocs/edit/process/cust_main_county.cgi
htdocs/edit/process/cust_pay.cgi
htdocs/edit/process/cust_pkg.cgi
htdocs/edit/process/part_pkg.cgi
htdocs/edit/process/part_referral.cgi
htdocs/edit/process/part_svc.cgi
htdocs/edit/process/svc_acct.cgi
htdocs/edit/process/svc_acct_pop.cgi
htdocs/edit/process/svc_acct_sm.cgi
htdocs/edit/process/svc_domain.cgi
htdocs/edit/svc_acct.cgi
htdocs/edit/svc_acct_pop.cgi
htdocs/edit/svc_acct_sm.cgi
htdocs/edit/svc_domain.cgi
htdocs/misc/bill.cgi
htdocs/misc/cancel-unaudited.cgi
htdocs/misc/cancel_pkg.cgi
htdocs/misc/expire_pkg.cgi
htdocs/misc/link.cgi
htdocs/misc/print-invoice.cgi
htdocs/misc/process/link.cgi
htdocs/misc/susp_pkg.cgi
htdocs/misc/unsusp_pkg.cgi
htdocs/search/cust_bill.cgi
htdocs/search/cust_main.cgi
htdocs/search/cust_pkg.cgi
htdocs/search/svc_acct.cgi
htdocs/search/svc_acct_sm.cgi
htdocs/search/svc_domain.cgi
htdocs/view/cust_bill.cgi
htdocs/view/cust_main.cgi
htdocs/view/cust_pkg.cgi
htdocs/view/svc_acct.cgi
htdocs/view/svc_acct_sm.cgi
htdocs/view/svc_domain.cgi

index 446401e..1b459df 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: agent.cgi,v 1.9 1999-01-18 09:41:14 ivan Exp $
+# $Id: agent.cgi,v 1.10 1999-01-19 05:13:24 ivan Exp $
 #
 # ivan@sisd.com 97-dec-12
 #
 # lose background, FS::CGI ivan@sisd.com 98-sep-2
 #
 # $Log: agent.cgi,v $
-# Revision 1.9  1999-01-18 09:41:14  ivan
+# Revision 1.10  1999-01-19 05:13:24  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.9  1999/01/18 09:41:14  ivan
 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
 # (good idea anyway)
 #
@@ -42,6 +46,7 @@
 #
 
 use strict;
+use vars qw( $ui $cgi $p $agent );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup swapuid);
@@ -55,7 +60,7 @@ use FS::agent_type;
 use FS::UI::CGI;
 use FS::UI::agent;
 
-my $ui = new FS::UI::agent;
+$ui = new FS::UI::agent;
 $ui->browse;
 exit;
 
@@ -63,11 +68,11 @@ exit;
 
 __END__
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 
 &cgisuidsetup($cgi);
 
-my($p)=popurl(2);
+$p = popurl(2);
 
 print $cgi->header( '-expires' => 'now' ), header('Agent Listing', menubar(
   'Main Menu'   => $p,
@@ -88,7 +93,6 @@ END
 #        <TH><FONT SIZE=-1>Agent #</FONT></TH>
 #        <TH>Agent</TH>
 
-my($agent);
 foreach $agent ( sort { 
   $a->getfield('agentnum') <=> $b->getfield('agentnum')
 } qsearch('agent',{}) ) {
index 8bbf1e2..ff3a68c 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: agent_type.cgi,v 1.4 1999-01-18 09:41:15 ivan Exp $
+# $Id: agent_type.cgi,v 1.5 1999-01-19 05:13:25 ivan Exp $
 #
 # ivan@sisd.com 97-dec-10
 #
 # lose background, FS::CGI ivan@sisd.com 98-sep-2
 #
 # $Log: agent_type.cgi,v $
-# Revision 1.4  1999-01-18 09:41:15  ivan
+# Revision 1.5  1999-01-19 05:13:25  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.4  1999/01/18 09:41:15  ivan
 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
 # (good idea anyway)
 #
@@ -23,6 +27,7 @@
 #
 
 use strict;
+use vars qw( $cgi $p $agent_type );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup swapuid);
@@ -32,11 +37,11 @@ use FS::agent_type;
 use FS::type_pkgs;
 use FS::part_pkg;
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 
 &cgisuidsetup($cgi);
 
-my($p)=popurl(2);
+$p = popurl(2);
 print $cgi->header( '-expires' => 'now' ), header("Agent Type Listing", menubar(
   'Main Menu' => $p,
 )), "Agent types define groups of packages that you can then assign to".
@@ -47,7 +52,6 @@ print $cgi->header( '-expires' => 'now' ), header("Agent Type Listing", menubar(
       </TR>
 END
 
-my($agent_type);
 foreach $agent_type ( sort { 
   $a->getfield('typenum') <=> $b->getfield('typenum')
 } qsearch('agent_type',{}) ) {
index 728f1d9..0e899f2 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: cust_main_county.cgi,v 1.4 1999-01-18 09:41:16 ivan Exp $
+# $Id: cust_main_county.cgi,v 1.5 1999-01-19 05:13:26 ivan Exp $
 #
 # ivan@sisd.com 97-dec-13
 #
 # lose background, FS::CGI ivan@sisd.com 98-sep-2
 #
 # $Log: cust_main_county.cgi,v $
-# Revision 1.4  1999-01-18 09:41:16  ivan
+# Revision 1.5  1999-01-19 05:13:26  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.4  1999/01/18 09:41:16  ivan
 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
 # (good idea anyway)
 #
@@ -22,6 +26,7 @@
 #
 
 use strict;
+use vars qw( $cgi $p $cust_main_county );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup swapuid);
@@ -29,11 +34,11 @@ use FS::Record qw(qsearch qsearchs);
 use FS::CGI qw(header menubar popurl table);
 use FS::cust_main_county;
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 
 &cgisuidsetup($cgi);
 
-my($p) = popurl(2);
+$p = popurl(2);
 
 print $cgi->header( '-expires' => 'now' ), header("Tax Rate Listing", menubar(
   'Main Menu' => $p,
@@ -52,7 +57,6 @@ print table, <<END;
       </TR>
 END
 
-my($cust_main_county);
 foreach $cust_main_county ( qsearch('cust_main_county',{}) ) {
   my($hashref)=$cust_main_county->hashref;
   print <<END;
index 22d8b9a..413a108 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: part_pkg.cgi,v 1.5 1999-01-18 09:41:17 ivan Exp $
+# $Id: part_pkg.cgi,v 1.6 1999-01-19 05:13:27 ivan Exp $
 #
 # ivan@sisd.com 97-dec-5,9
 #
 # lose background, FS::CGI ivan@sisd.com 98-sep-2
 #
 # $Log: part_pkg.cgi,v $
-# Revision 1.5  1999-01-18 09:41:17  ivan
+# Revision 1.6  1999-01-19 05:13:27  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.5  1999/01/18 09:41:17  ivan
 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
 # (good idea anyway)
 #
@@ -25,6 +29,7 @@
 #
 
 use strict;
+use vars qw( $cgi $p $part_pkg );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup swapuid);
@@ -34,11 +39,11 @@ use FS::part_pkg;
 use FS::pkg_svc;
 use FS::part_svc;
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 
 &cgisuidsetup($cgi);
 
-my $p = popurl(2);
+$p = popurl(2);
 
 print $cgi->header( '-expires' => 'now' ), header("Package Part Listing",menubar(
   'Main Menu' => $p,
@@ -57,7 +62,6 @@ print $cgi->header( '-expires' => 'now' ), header("Package Part Listing",menubar
       </TR>
 END
 
-my($part_pkg);
 foreach $part_pkg ( sort { 
   $a->getfield('pkgpart') <=> $b->getfield('pkgpart')
 } qsearch('part_pkg',{}) ) {
index 859995a..e336056 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: part_referral.cgi,v 1.6 1999-01-18 09:41:18 ivan Exp $
+# $Id: part_referral.cgi,v 1.7 1999-01-19 05:13:28 ivan Exp $
 #
 # ivan@sisd.com 98-feb-23 
 #
 # lose background, FS::CGI ivan@sisd.com 98-sep-2
 #
 # $Log: part_referral.cgi,v $
-# Revision 1.6  1999-01-18 09:41:18  ivan
+# Revision 1.7  1999-01-19 05:13:28  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.6  1999/01/18 09:41:18  ivan
 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
 # (good idea anyway)
 #
@@ -28,6 +32,7 @@
 #
 
 use strict;
+use vars qw( $cgi $p $part_referral );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup swapuid);
@@ -35,11 +40,11 @@ use FS::Record qw(qsearch);
 use FS::CGI qw(header menubar popurl table);
 use FS::part_referral;
 
-my $cgi = new CGI;
+$cgi = new CGI;
 
 &cgisuidsetup($cgi);
 
-my $p = popurl(2);
+$p = popurl(2);
 
 print $cgi->header( '-expires' => 'now' ), header("Referral Listing", menubar(
   'Main Menu' => $p,
@@ -50,7 +55,6 @@ print $cgi->header( '-expires' => 'now' ), header("Referral Listing", menubar(
       </TR>
 END
 
-my($part_referral);
 foreach $part_referral ( sort { 
   $a->getfield('refnum') <=> $b->getfield('refnum')
 } qsearch('part_referral',{}) ) {
index 38c05cb..5112f51 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: part_svc.cgi,v 1.8 1999-01-18 09:41:19 ivan Exp $
+# $Id: part_svc.cgi,v 1.9 1999-01-19 05:13:29 ivan Exp $
 #
 # ivan@sisd.com 97-nov-14, 97-dec-9
 #
 # lose background, FS::CGI ivan@sisd.com 98-sep-2
 #
 # $Log: part_svc.cgi,v $
-# Revision 1.8  1999-01-18 09:41:19  ivan
+# Revision 1.9  1999-01-19 05:13:29  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.8  1999/01/18 09:41:19  ivan
 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
 # (good idea anyway)
 #
@@ -34,6 +38,7 @@
 #
 
 use strict;
+use vars qw( $cgi $p $part_svc );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
@@ -41,11 +46,11 @@ use FS::Record qw(qsearch fields);
 use FS::part_svc;
 use FS::CGI qw(header menubar popurl table);
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 
 &cgisuidsetup($cgi);
 
-my $p = popurl(2);
+$p = popurl(2);
 
 print $cgi->header( '-expires' => 'now' ), header('Service Part Listing', menubar(
   'Main Menu' => $p,
@@ -61,7 +66,6 @@ print table, <<END;
       </TR>
 END
 
-my($part_svc);
 foreach $part_svc ( sort {
   $a->getfield('svcpart') <=> $b->getfield('svcpart')
 } qsearch('part_svc',{}) ) {
index b172e78..5f41261 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: svc_acct_pop.cgi,v 1.4 1999-01-18 09:41:20 ivan Exp $
+# $Id: svc_acct_pop.cgi,v 1.5 1999-01-19 05:13:30 ivan Exp $
 #
 # ivan@sisd.com 98-mar-8
 #
 # lose background, FS::CGI ivan@sisd.com 98-sep-2
 #
 # $Log: svc_acct_pop.cgi,v $
-# Revision 1.4  1999-01-18 09:41:20  ivan
+# Revision 1.5  1999-01-19 05:13:30  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.4  1999/01/18 09:41:20  ivan
 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
 # (good idea anyway)
 #
@@ -22,6 +26,7 @@
 #
 
 use strict;
+use vars qw( $cgi $p $svc_acct_pop );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup swapuid);
@@ -29,11 +34,11 @@ use FS::Record qw(qsearch qsearchs);
 use FS::CGI qw(header menubar table popurl);
 use FS::svc_acct_pop;
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 
 &cgisuidsetup($cgi);
 
-my $p = popurl(2);
+$p = popurl(2);
 
 print $cgi->header( '-expires' => 'now' ), header('POP Listing', menubar(
   'Main Menu' => $p,
@@ -47,7 +52,6 @@ print $cgi->header( '-expires' => 'now' ), header('POP Listing', menubar(
       </TR>
 END
 
-my($svc_acct_pop);
 foreach $svc_acct_pop ( sort { 
   $a->getfield('popnum') <=> $b->getfield('popnum')
 } qsearch('svc_acct_pop',{}) ) {
index 291f1b2..8548907 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: agent.cgi,v 1.4 1999-01-18 09:41:21 ivan Exp $
+# $Id: agent.cgi,v 1.5 1999-01-19 05:13:31 ivan Exp $
 #
 # ivan@sisd.com 97-dec-12
 #
 # use FS::CGI, added inline documentation ivan@sisd.com 98-jul-12
 #
 # $Log: agent.cgi,v $
-# Revision 1.4  1999-01-18 09:41:21  ivan
+# Revision 1.5  1999-01-19 05:13:31  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.4  1999/01/18 09:41:21  ivan
 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
 # (good idea anyway)
 #
@@ -23,6 +27,7 @@
 #
 
 use strict;
+use vars qw ( $cgi $agent $action $query $hashref $p $agent_type );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
@@ -31,22 +36,21 @@ use FS::Record qw(qsearch qsearchs);
 use FS::agent;
 use FS::agent_type;
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 
 &cgisuidsetup($cgi);
 
-my($agent,$action);
-my($query) = $cgi->keywords;
+($query) = $cgi->keywords;
 if ( $query =~ /^(\d+)$/ ) { #editing
   $agent=qsearchs('agent',{'agentnum'=>$1});
   $action='Edit';
 } else { #adding
-  $agent=create FS::agent {};
+  $agent = new FS::agent {};
   $action='Add';
 }
-my($hashref)=$agent->hashref;
+$hashref = $agent->hashref;
 
-my $p = popurl(2);
+$p = popurl(2);
 
 print $cgi->header( '-expires' => 'now' ), header("$action Agent", menubar(
   'Main Menu' => $p,
@@ -62,7 +66,6 @@ Agent                     <INPUT TYPE="text" NAME="agent" SIZE=32 VALUE="$hashre
 Agent type                <SELECT NAME="typenum" SIZE=1>
 END
 
-my($agent_type);
 foreach $agent_type (qsearch('agent_type',{})) {
   print "<OPTION";
   print " SELECTED"
index b9da2a2..b12c4e2 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: agent_type.cgi,v 1.8 1999-01-18 09:41:22 ivan Exp $
+# $Id: agent_type.cgi,v 1.9 1999-01-19 05:13:32 ivan Exp $
 #
 # agent_type.cgi: Add/Edit agent type (output form)
 #
 # use FS::CGI, added inline documentation ivan@sisd.com 98-jul-12
 #
 # $Log: agent_type.cgi,v $
-# Revision 1.8  1999-01-18 09:41:22  ivan
+# Revision 1.9  1999-01-19 05:13:32  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.8  1999/01/18 09:41:22  ivan
 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
 # (good idea anyway)
 #
@@ -38,6 +42,7 @@
 #
 
 use strict;
+use vars qw( $cgi $agent_type $action $hashref $p $part_pkg );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
@@ -48,23 +53,22 @@ use FS::agent_type;
 use FS::part_pkg;
 use FS::type_pkgs;
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 
 &cgisuidsetup($cgi);
 
-my($agent_type,$action);
 if ( $cgi->keywords ) { #editing
   my( $query ) = $cgi->keywords;
   $query =~ /^(\d+)$/;
   $agent_type=qsearchs('agent_type',{'typenum'=>$1});
   $action='Edit';
 } else { #adding
-  $agent_type=create FS::agent_type {};
+  $agent_type = new FS::agent_type {};
   $action='Add';
 }
-my($hashref)=$agent_type->hashref;
+$hashref = $agent_type->hashref;
 
-my($p)=popurl(2);
+$p = popurl(2);
 print $cgi->header( '-expires' => 'now' ), header("$action Agent Type", menubar(
   'Main Menu' => "$p",
   'View all agent types' => "${p}browse/agent_type.cgi",
@@ -78,7 +82,6 @@ print <<END;
 <BR><BR>Select which packages agents of this type may sell to customers<BR>
 END
 
-my($part_pkg);
 foreach $part_pkg ( qsearch('part_pkg',{}) ) {
   print qq!<BR><INPUT TYPE="checkbox" NAME="pkgpart!,
         $part_pkg->getfield('pkgpart'), qq!" !,
index 4b7276f..fdb821f 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: cust_credit.cgi,v 1.4 1999-01-18 09:41:23 ivan Exp $
+# $Id: cust_credit.cgi,v 1.5 1999-01-19 05:13:33 ivan Exp $
 #
 # Usage: cust_credit.cgi custnum [ -paybatch ]
 #        http://server.name/path/cust_credit?custnum [ -paybatch ]
 # rewrite ivan@sisd.com 98-mar-16
 #
 # $Log: cust_credit.cgi,v $
-# Revision 1.4  1999-01-18 09:41:23  ivan
+# Revision 1.5  1999-01-19 05:13:33  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.4  1999/01/18 09:41:23  ivan
 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
 # (good idea anyway)
 #
 #
 
 use strict;
+use vars qw( $cgi $query $custnum $otaker $p1 $crednum $date $amount $reason );
 use Date::Format;
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup getotaker);
 use FS::CGI qw(header popurl);
 
-my $cgi = new CGI;
+$cgi = new CGI;
 
 cgisuidsetup($cgi);
 
-my($query) = $cgi->keywords;
+($query) = $cgi->keywords;
 $query =~ /^(\d+)$/;
-my($custnum)=$1;
+$custnum = $1;
 
-my($otaker)=getotaker;
+$otaker = getotaker;
 
-my $p1 = popurl(1);
+$p1 = popurl(1);
 
 print $cgi->header( '-expires' => 'now' ), header("Post Credit", ''), <<END;
     <FORM ACTION="${p1}process/cust_credit.cgi" METHOD=POST>
@@ -61,7 +66,7 @@ print $cgi->header( '-expires' => 'now' ), header("Post Credit", ''), <<END;
 END
 
 #crednum
-my($crednum)="";
+$crednum = "";
 print qq!Credit #<B>!, $crednum ? $crednum : " <I>(NEW)</I>", qq!</B><INPUT TYPE="hidden" NAME="crednum" VALUE="$crednum">!;
 
 #custnum
@@ -71,11 +76,11 @@ print qq!\nCustomer #<B>$custnum</B><INPUT TYPE="hidden" NAME="custnum" VALUE="$
 print qq!<INPUT TYPE="hidden" NAME="paybatch" VALUE="">!;
 
 #date
-my($date)=time;
+$date = time;
 print qq!\nDate: <B>!, time2str("%D",$date), qq!</B><INPUT TYPE="hidden" NAME="_date" VALUE="$date">!;
 
 #amount
-my($amount)='';
+$amount = '';
 print qq!\nAmount \$<INPUT TYPE="text" NAME="amount" VALUE="$amount" SIZE=8 MAXLENGTH=8>!;
 
 #refund?
@@ -85,7 +90,7 @@ print qq!\nAmount \$<INPUT TYPE="text" NAME="amount" VALUE="$amount" SIZE=8 MAXL
 print qq!<INPUT TYPE="hidden" NAME="otaker" VALUE="$otaker">!;
 
 #reason
-my($reason)='';
+$reason = '';
 print qq!\nReason <INPUT TYPE="text" NAME="reason" VALUE="$reason" SIZE=72>!;
 
 print <<END;
index 174c798..1c2ba4c 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: cust_main.cgi,v 1.6 1999-01-18 09:41:24 ivan Exp $
+# $Id: cust_main.cgi,v 1.7 1999-01-19 05:13:34 ivan Exp $
 #
 # Usage: cust_main.cgi custnum
 #        http://server.name/path/cust_main.cgi?custnum
 # fixed one missed day->daytime ivan@sisd.com 98-jul-13
 #
 # $Log: cust_main.cgi,v $
-# Revision 1.6  1999-01-18 09:41:24  ivan
+# Revision 1.7  1999-01-19 05:13:34  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.6  1999/01/18 09:41:24  ivan
 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
 # (good idea anyway)
 #
 #
 
 use strict;
+use vars qw( $cgi $custnum $action $cust_main $p1 @agents $agentnum 
+             $last $first $ss $company $address1 $address2 $city $zip 
+             $daytime $night $fax @invoicing_list $invoicing_list $payinfo
+             $payname %payby %paybychecked $refnum $otaker );
 use CGI::Switch;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup getotaker);
@@ -62,12 +70,11 @@ use FS::Record qw(qsearch qsearchs);
 use FS::CGI qw(header popurl itable table);
 use FS::cust_main;
 
-my $cgi = new CGI;
+$cgi = new CGI;
 cgisuidsetup($cgi);
 
 #get record
 
-my ( $custnum, $action, $cust_main );
 if ( $cgi->keywords ) { #editing
   my( $query ) = $cgi->keywords;
   $query =~ /^(\d+)$/;
@@ -83,7 +90,7 @@ if ( $cgi->keywords ) { #editing
 
 # top
 
-my $p1 = popurl(1);
+$p1 = popurl(1);
 print $cgi->header( '-expires' => 'now' ), header("Customer $action", ''),
       qq!<FORM ACTION="${p1}process/cust_main.cgi" METHOD=POST>!,
       qq!<INPUT TYPE="hidden" NAME="custnum" VALUE="$custnum">!,
@@ -93,8 +100,8 @@ print $cgi->header( '-expires' => 'now' ), header("Customer $action", ''),
 
 # agent
 
-my @agents = qsearch( 'agent', {} );
-my $agentnum = $cust_main->agentnum || $agents[0]->agentnum; #default to first
+@agents = qsearch( 'agent', {} );
+$agentnum = $cust_main->agentnum || $agents[0]->agentnum; #default to first
 if ( scalar(@agents) == 1 ) {
   print qq!<INPUT TYPE="hidden" NAME="agentnum" VALUE="$agentnum">!;
 } else {
@@ -111,7 +118,7 @@ if ( scalar(@agents) == 1 ) {
 
 # contact info
 
-my($last,$first,$ss,$company,$address1,$address2,$city,$zip)=(
+($last,$first,$ss,$company,$address1,$address2,$city,$zip)=(
   $cust_main->last,
   $cust_main->first,
   $cust_main->ss,
@@ -143,7 +150,7 @@ foreach ( qsearch('cust_main_county',{}) ) {
 }
 print qq!</SELECT></TD><TH>Zip</TH><TD><INPUT TYPE="text" NAME="zip" VALUE="$zip" SIZE=10></TD></TR>!;
 
-my($daytime,$night,$fax)=(
+($daytime,$night,$fax)=(
   $cust_main->daytime,
   $cust_main->night,
   $cust_main->fax,
@@ -190,28 +197,28 @@ print "<BR>Billing information", itable("#c0c0c0"),
 print qq! CHECKED! if $cust_main->tax eq "Y";
 print qq!>Tax Exempt!;
 print qq!</TD></TR><TR><TD><INPUT TYPE="checkbox" NAME="invoicing_list_POST" VALUE="POST"!;
-my @invoicing_list = $cust_main->invoicing_list;
+@invoicing_list = $cust_main->invoicing_list;
 print qq! CHECKED!
   if ! @invoicing_list || grep { $_ eq 'POST' } @invoicing_list;
 print qq!> Postal mail invoice!;
-my $invoicing_list = join(', ', grep { $_ ne 'POST' } @invoicing_list );
+$invoicing_list = join(', ', grep { $_ ne 'POST' } @invoicing_list );
 print qq!</TD></TR><TR><TD>Email invoice <INPUT TYPE="text" NAME="invoicing_list" VALUE="$invoicing_list"></TD>!;
 
 print "</TD></TR></TABLE>";
 
 print table("#c0c0c0"), "<TR>";
 
-my($payinfo, $payname)=(
+($payinfo, $payname)=(
   $cust_main->payinfo,
   $cust_main->payname,
 );
 
-my %payby = (
+%payby = (
   'CARD' => qq!Credit card<BR><INPUT TYPE="text" NAME="CARD_payinfo" VALUE="" MAXLENGTH=19><BR>Exp !. expselect("CARD"). qq!<BR>Name on card<BR><INPUT TYPE="text" NAME="CARD_payname" VALUE="">!,
   'BILL' => qq!Billing<BR>P.O. <INPUT TYPE="text" NAME="BILL_payinfo" VALUE=""><BR>Exp !. expselect("BILL", "12-2037"). qq!<BR>Attention<BR><INPUT TYPE="text" NAME="BILL_payname" VALUE="Accounts Payable">!,
   'COMP' => qq!Complimentary<BR>Approved by<INPUT TYPE="text" NAME="COMP_payinfo" VALUE=""><BR>Exp !. expselect("COMP"),
 );
-my %paybychecked = (
+%paybychecked = (
   'CARD' => qq!Credit card<BR><INPUT TYPE="text" NAME="CARD_payinfo" VALUE="$payinfo" MAXLENGTH=19><BR>Exp !. expselect("CARD", $cust_main->paydate). qq!<BR>Name on card<BR><INPUT TYPE="text" NAME="CARD_payname" VALUE="$payname">!,
   'BILL' => qq!Billing<BR>P.O. <INPUT TYPE="text" NAME="BILL_payinfo" VALUE="$payinfo"><BR>Exp !. expselect("BILL", $cust_main->paydate). qq!<BR>Attention<BR><INPUT TYPE="text" NAME="BILL_payname" VALUE="$payname">!,
   'COMP' => qq!Complimentary<BR>Approved by<INPUT TYPE="text" NAME="COMP_payinfo" VALUE="$payinfo"><BR>Exp !. expselect("COMP", $cust_main->paydate),
@@ -229,7 +236,7 @@ print "</TR></TABLE>";
 
 #referral
 
-my $refnum = $cust_main->refnum || 0;
+$refnum = $cust_main->refnum || 0;
 if ( $custnum ) {
   print qq!<INPUT TYPE="hidden" NAME="refnum" VALUE="$refnum">!;
 } else {
@@ -246,7 +253,7 @@ if ( $custnum ) {
   print "</SELECT>";
 }
 
-my $otaker = $cust_main->otaker;
+$otaker = $cust_main->otaker;
 print qq!<INPUT TYPE="hidden" NAME="otaker" VALUE="$otaker">!,
       qq!<BR><BR><INPUT TYPE="submit" VALUE="!,
       $custnum ?  "Apply Changes" : "Add Customer", qq!">!,
index 1b231bc..6562984 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: cust_main_county-expand.cgi,v 1.4 1999-01-18 09:41:25 ivan Exp $
+# $Id: cust_main_county-expand.cgi,v 1.5 1999-01-19 05:13:35 ivan Exp $
 #
 # ivan@sisd.com 97-dec-16
 #
 # lose background, FS::CGI ivan@sisd.com 98-sep-2
 #
 # $Log: cust_main_county-expand.cgi,v $
-# Revision 1.4  1999-01-18 09:41:25  ivan
+# Revision 1.5  1999-01-19 05:13:35  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.4  1999/01/18 09:41:25  ivan
 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
 # (good idea anyway)
 #
@@ -22,6 +26,7 @@
 #
 
 use strict;
+use vars qw( $cgi $query $taxnum $cust_main_county $p1 );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
@@ -29,19 +34,19 @@ use FS::Record qw(qsearch qsearchs);
 use FS::CGI qw(header menubar popurl);
 use FS::cust_main_county;
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 
 &cgisuidsetup($cgi);
 
-my($query) = $cgi->keywords;
+($query) = $cgi->keywords;
 $query =~ /^(\d+)$/
   or die "Illegal taxnum!";
-my($taxnum)=$1;
+$taxnum = $1;
 
-my($cust_main_county)=qsearchs('cust_main_county',{'taxnum'=>$taxnum});
+$cust_main_county = qsearchs('cust_main_county',{'taxnum'=>$taxnum});
 die "Can't expand entry!" if $cust_main_county->getfield('county');
 
-my $p1 = popurl(1);
+$p1 = popurl(1);
 print $cgi->header( '-expires' => 'now' ), header("Tax Rate (expand)", menubar(
   'Main Menu' => popurl(2),
 )), <<END;
index 7d5468b..05c0727 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: cust_main_county.cgi,v 1.4 1999-01-18 09:41:26 ivan Exp $
+# $Id: cust_main_county.cgi,v 1.5 1999-01-19 05:13:36 ivan Exp $
 #
 # ivan@sisd.com 97-dec-13-16
 #
 # lose background, FS::CGI ivan@sisd.com 98-sep-2
 # 
 # $Log: cust_main_county.cgi,v $
-# Revision 1.4  1999-01-18 09:41:26  ivan
+# Revision 1.5  1999-01-19 05:13:36  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.4  1999/01/18 09:41:26  ivan
 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
 # (good idea anyway)
 #
@@ -23,6 +27,7 @@
 #
 
 use strict;
+use vars qw( $cgi $cust_main_county );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
@@ -30,7 +35,7 @@ use FS::Record qw(qsearch qsearchs);
 use FS::CGI qw(header menubar popurl table);
 use FS::cust_main_county;
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 
 &cgisuidsetup($cgi);
 
@@ -46,7 +51,6 @@ print $cgi->header( '-expires' => 'now' ), header("Edit tax rates", menubar(
       </TR>
 END
 
-my($cust_main_county);
 foreach $cust_main_county ( qsearch('cust_main_county',{}) ) {
   my($hashref)=$cust_main_county->hashref;
   print <<END;
index 929c9e7..4cd95de 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: cust_pay.cgi,v 1.3 1999-01-18 09:41:27 ivan Exp $
+# $Id: cust_pay.cgi,v 1.4 1999-01-19 05:13:37 ivan Exp $
 #
 # Usage: cust_pay.cgi invnum
 #        http://server.name/path/cust_pay.cgi?invnum
 # rewrite ivan@sisd.com 98-mar-16
 #
 # $Log: cust_pay.cgi,v $
-# Revision 1.3  1999-01-18 09:41:27  ivan
+# Revision 1.4  1999-01-19 05:13:37  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.3  1999/01/18 09:41:27  ivan
 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
 # (good idea anyway)
 #
 #
 
 use strict;
+use vars qw( $cgi $query $invnum $p1 $date $payby $payinfo );
 use Date::Format;
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
 use FS::CGI qw(header popurl);
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 cgisuidsetup($cgi);
 
-my($query) = $cgi->keywords;
+($query) = $cgi->keywords;
 $query =~ /^(\d+)$/;
-my($invnum)=$1;
+$invnum = $1;
 
-my $p1 = popurl(1);
+$p1 = popurl(1);
 print $cgi->header( '-expires' => 'now' ), header("Enter payment", ''), <<END;
     <FORM ACTION="${p1}process/cust_pay.cgi" METHOD=POST>
     <HR><PRE>
@@ -46,18 +51,18 @@ END
 print qq!Invoice #<B>$invnum</B><INPUT TYPE="hidden" NAME="invnum" VALUE="$invnum">!;
 
 #date
-my($date)=time;
+$date = time;
 print qq!<BR>Date: <B>!, time2str("%D",$date), qq!</B><INPUT TYPE="hidden" NAME="_date" VALUE="$date">!;
 
 #paid
 print qq!<BR>Amount \$<INPUT TYPE="text" NAME="paid" VALUE="" SIZE=8 MAXLENGTH=8>!;
 
 #payby
-my($payby)="BILL";
+$payby = "BILL";
 print qq!<BR>Payby: <B>$payby</B><INPUT TYPE="hidden" NAME="payby" VALUE="$payby">!;
 
 #payinfo (check # now as payby="BILL" hardcoded.. what to do later?)
-my($payinfo)="";
+$payinfo = "";
 print qq!<BR>Check #<INPUT TYPE="text" NAME="payinfo" VALUE="$payinfo">!;
 
 #paybatch
index 763eeae..ed42008 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: cust_pkg.cgi,v 1.3 1999-01-18 09:41:28 ivan Exp $
+# $Id: cust_pkg.cgi,v 1.4 1999-01-19 05:13:38 ivan Exp $
 #
 # this is for changing packages around, not editing things within the package
 #
 # 98-jun-1
 #
 # $Log: cust_pkg.cgi,v $
-# Revision 1.3  1999-01-18 09:41:28  ivan
+# Revision 1.4  1999-01-19 05:13:38  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.3  1999/01/18 09:41:28  ivan
 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
 # (good idea anyway)
 #
@@ -34,6 +38,8 @@
 #
 
 use strict;
+use vars qw( $cgi %pkg %comment $query $custnum $otaker $p1 @cust_pkg 
+             $cust_main $agent $type_pkgs $count );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup getotaker);
@@ -41,10 +47,9 @@ use FS::Record qw(qsearch qsearchs);
 use FS::CGI qw(header popurl);
 use FS::part_pkg;
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 &cgisuidsetup($cgi);
 
-my(%pkg,%comment);
 foreach (qsearch('part_pkg', {})) {
   $pkg{ $_ -> getfield('pkgpart') } = $_->getfield('pkg');
   $comment{ $_ -> getfield('pkgpart') } = $_->getfield('comment');
@@ -52,13 +57,13 @@ foreach (qsearch('part_pkg', {})) {
 
 #untaint custnum
 
-my($query) = $cgi->keywords;
+($query) = $cgi->keywords;
 $query =~ /^(\d+)$/;
-my($custnum)=$1;
+$custnum = $1;
 
-my($otaker)=&getotaker;
+$otaker = &getotaker;
 
-my $p1 = popurl(1);
+$p1 = popurl(1);
 print $cgi->header( '-expires' => 'now' ), header("Add/Edit Packages", ''), <<END;
     <FORM ACTION="${p1}process/cust_pkg.cgi" METHOD=POST>
     <HR>
@@ -68,7 +73,7 @@ END
 print qq!<INPUT TYPE="hidden" NAME="new_custnum" VALUE="$custnum">!;
 
 #current packages (except cancelled packages)
-my(@cust_pkg) = grep ! $_->getfield('cancel'),
+@cust_pkg = grep ! $_->getfield('cancel'),
   qsearch('cust_pkg',{'custnum'=>$custnum});
 
 if (@cust_pkg) {
@@ -105,11 +110,10 @@ These are packages the customer can purchase.  Specify the quantity to add
 of each package.<BR><BR>
 END
 
-my($cust_main)=qsearchs('cust_main',{'custnum'=>$custnum});
-my($agent)=qsearchs('agent',{'agentnum'=> $cust_main->agentnum });
+$cust_main = qsearchs('cust_main',{'custnum'=>$custnum});
+$agent = qsearchs('agent',{'agentnum'=> $cust_main->agentnum });
 
-my($type_pkgs);
-my ($count) = 0 ;
+$count = 0 ;
 print qq!<CENTER><TABLE>! ;
 foreach $type_pkgs ( qsearch('type_pkgs',{'typenum'=> $agent->typenum }) ) {
   my($pkgpart)=$type_pkgs->pkgpart;
index 9870017..e7ac2ae 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: part_pkg.cgi,v 1.7 1999-01-18 09:41:29 ivan Exp $
+# $Id: part_pkg.cgi,v 1.8 1999-01-19 05:13:39 ivan Exp $
 #
 # part_pkg.cgi: Add/Edit package (output form)
 #
 # use FS::CGI, added inline documentation ivan@sisd.com 98-jul-12
 #
 # $Log: part_pkg.cgi,v $
-# Revision 1.7  1999-01-18 09:41:29  ivan
+# Revision 1.8  1999-01-19 05:13:39  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.7  1999/01/18 09:41:29  ivan
 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
 # (good idea anyway)
 #
@@ -34,6 +38,7 @@
 #
 
 use strict;
+use vars qw( $cgi $part_pkg $action $query $hashref $part_svc $count );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
@@ -43,7 +48,7 @@ use FS::part_svc;
 use FS::pkg_svc;
 use FS::CGI qw(header menubar popurl);
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 
 &cgisuidsetup($cgi);
 
@@ -58,8 +63,7 @@ if ( $cgi->param('pkgnum') && $cgi->param('pkgnum') =~ /^(\d+)$/ ) {
   $cgi->param('pkgnum', '');
 }
 
-my($part_pkg,$action);
-my($query) = $cgi->keywords;
+($query) = $cgi->keywords;
 if ( $cgi->param('clone') ) {
   $action='Custom Pricing';
   my $old_part_pkg =
@@ -70,9 +74,9 @@ if ( $cgi->param('clone') ) {
   $part_pkg=qsearchs('part_pkg',{'pkgpart'=>$1});
 } else {
   $action='Add';
-  $part_pkg=create FS::part_pkg {};
+  $part_pkg = new FS::part_pkg {};
 }
-my($hashref)=$part_pkg->hashref;
+$hashref = $part_pkg->hashref;
 
 print $cgi->header( '-expires' => 'now' ), header("$action Package Definition", menubar(
   'Main Menu' => popurl(2),
@@ -109,15 +113,13 @@ Enter the quantity of each service this package includes.<BR><BR>
 END
 }
 
-my($part_svc);
-my($count) = 0 ;
 foreach $part_svc ( qsearch('part_svc',{}) ) {
 
   my($svcpart)=$part_svc->getfield('svcpart');
   my($pkg_svc)=qsearchs('pkg_svc',{
     'pkgpart'  => $cgi->param('clone') || $part_pkg->getfield('pkgpart'),
     'svcpart'  => $svcpart,
-  })  || create FS::pkg_svc({
+  })  || new FS::pkg_svc({
     'pkgpart'  => $part_pkg->getfield('pkgpart'),
     'svcpart'  => $svcpart,
     'quantity' => 0,
index e159e03..6fd75f8 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: part_referral.cgi,v 1.3 1999-01-18 09:41:30 ivan Exp $
+# $Id: part_referral.cgi,v 1.4 1999-01-19 05:13:41 ivan Exp $
 #
 # ivan@sisd.com 98-feb-23
 #
 # lose background, FS::CGI ivan@sisd.com 98-sep-2
 #
 # $Log: part_referral.cgi,v $
-# Revision 1.3  1999-01-18 09:41:30  ivan
+# Revision 1.4  1999-01-19 05:13:41  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.3  1999/01/18 09:41:30  ivan
 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
 # (good idea anyway)
 #
@@ -21,6 +25,7 @@
 #
 
 use strict;
+use vars qw( $cgi $part_referral $action $hashref $p1 );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
@@ -28,21 +33,20 @@ use FS::Record qw(qsearch qsearchs);
 use FS::part_referral;
 use FS::CGI qw(header menubar);
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 
 &cgisuidsetup($cgi);
 
-my($part_referral,$action);
 if ( $cgi->var('QUERY_STRING') =~ /^(\d+)$/ ) { #editing
   $part_referral=qsearchs('part_referral',{'refnum'=>$1});
   $action='Edit';
 } else { #adding
-  $part_referral=create FS::part_referral {};
+  $part_referral = new FS::part_referral {};
   $action='Add';
 }
-my($hashref)=$part_referral->hashref;
+$hashref = $part_referral->hashref;
 
-my $p1 = popurl(1);
+$p1 = popurl(1);
 print $cgi->header( '-expires' => 'now' ), header("$action Referral", menubar(
   'Main Menu' => popurl(2),
   'View all referrals' => popurl(2). "browse/part_referral.cgi",
index c17d518..58a1e04 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: part_svc.cgi,v 1.6 1999-01-18 09:41:31 ivan Exp $
+# $Id: part_svc.cgi,v 1.7 1999-01-19 05:13:42 ivan Exp $
 #
 # ivan@sisd.com 97-nov-14
 #
 # use FS::CGI, added inline documentation ivan@sisd.com 98-jul-12
 #
 # $Log: part_svc.cgi,v $
-# Revision 1.6  1999-01-18 09:41:31  ivan
+# Revision 1.7  1999-01-19 05:13:42  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.6  1999/01/18 09:41:31  ivan
 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
 # (good idea anyway)
 #
@@ -25,6 +29,7 @@
 #
 
 use strict;
+use vars qw( $cgi $part_svc $action $query $hashref $p %defs $svcdb );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
@@ -32,22 +37,21 @@ use FS::Record qw(qsearchs fields);
 use FS::part_svc;
 use FS::CGI qw(header menubar popurl table);
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 
 &cgisuidsetup($cgi);
 
-my($part_svc,$action);
-my($query) = $cgi->keywords;
+($query) = $cgi->keywords;
 if ( $query && $query =~ /^(\d+)$/ ) { #editing
   $part_svc=qsearchs('part_svc',{'svcpart'=>$1});
   $action='Edit';
 } else { #adding
-  $part_svc=create FS::part_svc {};
+  $part_svc = new  FS::part_svc {};
   $action='Add';
 }
-my($hashref)=$part_svc->hashref;
+$hashref = $part_svc->hashref;
 
-my $p = popurl(2);
+$p = popurl(2);
 print $cgi->header( '-expires' => 'now' ), header("$action Service Definition", menubar(
   'Main Menu' => $p,
   'View all services' => "${p}browse/part_svc.cgi",
@@ -90,7 +94,7 @@ END
 
 #these might belong somewhere else for other user interfaces 
 #pry need to eventually create stuff that's shared amount UIs
-my(%defs)=(
+%defs = (
   'svc_acct' => {
     'dir'       => 'Home directory',
     'uid'       => 'UID (set to fixed and blank for dial-only)',
@@ -120,7 +124,6 @@ my(%defs)=(
   },
 );
 
-my($svcdb);
 #  svc_acct svc_domain svc_acct_sm svc_charge svc_wo
 foreach $svcdb ( qw(
   svc_acct svc_domain svc_acct_sm
index dbbfe80..1dab760 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: agent.cgi,v 1.5 1999-01-18 22:47:49 ivan Exp $
+# $Id: agent.cgi,v 1.6 1999-01-19 05:13:47 ivan Exp $
 #
 # ivan@sisd.com 97-dec-12
 #
 # lose background, FS::CGI ivan@sisd.com 98-sep-2
 #
 # $Log: agent.cgi,v $
-# Revision 1.5  1999-01-18 22:47:49  ivan
+# Revision 1.6  1999-01-19 05:13:47  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.5  1999/01/18 22:47:49  ivan
 # s/create/new/g; and use fields('table_name')
 #
 # Revision 1.4  1998/12/30 23:03:26  ivan
@@ -24,6 +28,7 @@
 #
 
 use strict;
+use vars qw ( $cgi $agentnum $old $new $error );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
@@ -31,25 +36,24 @@ use FS::Record qw(qsearch qsearchs fields);
 use FS::agent;
 use FS::CGI qw(idiot popurl);
 
-my($cgi)=new CGI;
+$cgi = new CGI;
 
 &cgisuidsetup($cgi);
 
-my($agentnum)=$cgi->param('agentnum');
+$agentnum = $cgi->param('agentnum');
 
-my($old)=qsearchs('agent',{'agentnum'=>$agentnum}) if $agentnum;
+$old = qsearchs('agent',{'agentnum'=>$agentnum}) if $agentnum;
 
 #unmunge typenum
 $cgi->param('typenum') =~ /^(\d+)(:.*)?$/;
 $cgi->param('typenum',$1);
 
-my($new)=new FS::agent ( {
+$new = new FS::agent ( {
   map {
     $_, scalar($cgi->param($_));
   } fields('agent')
 } );
 
-my($error);
 if ( $agentnum ) {
   $error=$new->replace($old);
 } else {
index 1efef9e..e138171 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: agent_type.cgi,v 1.5 1999-01-18 22:47:50 ivan Exp $
+# $Id: agent_type.cgi,v 1.6 1999-01-19 05:13:48 ivan Exp $
 #
 # ivan@sisd.com 97-dec-11
 #
 # lose background, FS::CGI ivan@sisd.com 98-sep-2
 #
 # $Log: agent_type.cgi,v $
-# Revision 1.5  1999-01-18 22:47:50  ivan
+# Revision 1.6  1999-01-19 05:13:48  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.5  1999/01/18 22:47:50  ivan
 # s/create/new/g; and use fields('table_name')
 #
 # Revision 1.4  1998/12/30 23:03:27  ivan
@@ -24,6 +28,7 @@
 #
 
 use strict;
+use vars qw ( $cgi $typenum $old $new $error $part_pkg );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::CGI qw(idiot popurl);
@@ -33,19 +38,18 @@ use FS::agent_type;
 use FS::type_pkgs;
 use FS::part_pkg;
 
-my($cgi)=new CGI;
+$cgi = new CGI;
 &cgisuidsetup($cgi);
 
-my($typenum)=$cgi->param('typenum');
-my($old)=qsearchs('agent_type',{'typenum'=>$typenum}) if $typenum;
+$typenum = $cgi->param('typenum');
+$old = qsearchs('agent_type',{'typenum'=>$typenum}) if $typenum;
 
-my($new)=new FS::agent_type ( {
+$new = new FS::agent_type ( {
   map {
     $_, scalar($cgi->param($_));
   } fields('agent_type')
 } );
 
-my($error);
 if ( $typenum ) {
   $error=$new->replace($old);
 } else {
@@ -58,7 +62,6 @@ if ( $error ) {
   exit;
 }
 
-my($part_pkg);
 foreach $part_pkg (qsearch('part_pkg',{})) {
   my($pkgpart)=$part_pkg->getfield('pkgpart');
 
index e88d057..8f4515e 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: cust_credit.cgi,v 1.3 1999-01-18 22:47:51 ivan Exp $
+# $Id: cust_credit.cgi,v 1.4 1999-01-19 05:13:49 ivan Exp $
 #
 # Usage: post form to:
 #        http://server.name/path/cust_credit.cgi
 #       bmccane@maxbaud.net     98-apr-3
 #
 # $Log: cust_credit.cgi,v $
-# Revision 1.3  1999-01-18 22:47:51  ivan
+# Revision 1.4  1999-01-19 05:13:49  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.3  1999/01/18 22:47:51  ivan
 # s/create/new/g; and use fields('table_name')
 #
 # Revision 1.2  1998/12/17 08:40:18  ivan
@@ -30,6 +34,7 @@
 #
 
 use strict;
+use vars qw( $cgi $custnum $new $error );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup getotaker);
@@ -37,22 +42,21 @@ use FS::CGI qw(popurl eidiot);
 use FS::Record qw(fields);
 use FS::cust_credit;
 
-my($cgi)=new CGI; # create form object
+$cgi = new CGI;
 cgisuidsetup($cgi);
 
 $cgi->param('custnum') =~ /^(\d*)$/ or die "Illegal custnum!";
-my($custnum)=$1;
+$custnum = $1;
 
 $cgi->param('otaker',getotaker);
 
-my($new) = new FS::cust_credit ( {
+$new = new FS::cust_credit ( {
   map {
     $_, scalar($cgi->param($_));
   #} qw(custnum _date amount otaker reason)
   } fields('cust_credit');
 } );
 
-my($error);
 $error=$new->insert;
 &eidiot($error) if $error;
 
index f656651..850f2ad 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: cust_main.cgi,v 1.4 1999-01-18 09:22:32 ivan Exp $
+# $Id: cust_main.cgi,v 1.5 1999-01-19 05:13:50 ivan Exp $
 #
 # Usage: post form to:
 #        http://server.name/path/cust_main.cgi
 #       bmccane@maxbaud.net     98-apr-3
 #
 # $Log: cust_main.cgi,v $
-# Revision 1.4  1999-01-18 09:22:32  ivan
+# Revision 1.5  1999-01-19 05:13:50  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.4  1999/01/18 09:22:32  ivan
 # changes to track email addresses for email invoicing
 #
 # Revision 1.3  1998/12/17 08:40:19  ivan
@@ -33,7 +37,7 @@
 #
 
 use strict;
-#use CGI;
+use vars qw( $cgi $payby @invoicing_list $new $custnum );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup getotaker);
@@ -41,7 +45,7 @@ use FS::CGI qw(eidiot popurl);
 use FS::Record qw(qsearchs fields);
 use FS::cust_main;
 
-my($cgi)=new CGI;
+$cgi = new CGI;
 &cgisuidsetup($cgi);
 
 #unmunge stuff
@@ -57,7 +61,7 @@ $cgi->param('state', $1);
 $cgi->param('county', $3 || '');
 $cgi->param('country', $4);
 
-my $payby = $cgi->param('payby');
+$payby = $cgi->param('payby');
 $cgi->param('payinfo', $cgi->param( $payby. '_payinfo' ) );
 $cgi->param('paydate',
   $cgi->param( $payby. '_month' ). '-'. $cgi->param( $payby. '_year' ) );
@@ -65,12 +69,12 @@ $cgi->param('payname', $cgi->param( $payby. '_payname' ) );
 
 $cgi->param('otaker', &getotaker );
 
-my @invoicing_list = split( /\s*\,\s*/, $cgi->param('invoicing_list') );
+@invoicing_list = split( /\s*\,\s*/, $cgi->param('invoicing_list') );
 push @invoicing_list, 'POST' if $cgi->param('invoicing_list_POST');
 
 #create new record object
 
-my($new) = new FS::cust_main ( {
+$new = new FS::cust_main ( {
   map {
     $_, scalar($cgi->param($_))
 #  } qw(custnum agentnum last first ss company address1 address2 city county
@@ -98,6 +102,6 @@ if ( $new->custnum eq '' ) {
   $new->invoicing_list( \@invoicing_list );
 }
 
-my $custnum = $new->custnum;
+$custnum = $new->custnum;
 print $cgi->redirect(popurl(3). "view/cust_main.cgi?$custnum#cust_main");
 
index e91410f..94aa854 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: cust_main_county-expand.cgi,v 1.4 1999-01-18 22:47:52 ivan Exp $
+# $Id: cust_main_county-expand.cgi,v 1.5 1999-01-19 05:13:51 ivan Exp $
 #
 # ivan@sisd.com 97-dec-16
 #
 # ivan@sisd.com 98-sep-2
 #
 # $Log: cust_main_county-expand.cgi,v $
-# Revision 1.4  1999-01-18 22:47:52  ivan
+# Revision 1.5  1999-01-19 05:13:51  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.4  1999/01/18 22:47:52  ivan
 # s/create/new/g; and use fields('table_name')
 #
 # Revision 1.3  1998/12/17 08:40:20  ivan
@@ -26,6 +30,7 @@
 #
 
 use strict;
+use vars qw ( $cgi $taxnum $cust_main_county @expansion $expansion );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup datasrc);
@@ -34,16 +39,15 @@ use FS::CGI qw(eidiot popurl);
 use FS::cust_main_county;
 use FS::cust_main;
 
-my($cgi)=new CGI;
+$cgi = new CGI;
 
 &cgisuidsetup($cgi);
 
 $cgi->param('taxnum') =~ /^(\d+)$/ or die "Illegal taxnum!";
-my($taxnum)=$1;
-my($cust_main_county)=qsearchs('cust_main_county',{'taxnum'=>$taxnum})
+$taxnum = $1;
+$cust_main_county = qsearchs('cust_main_county',{'taxnum'=>$taxnum})
   or die ("Unknown taxnum!");
 
-my(@expansion);
 if ( $cgi->param('delim') eq 'n' ) {
   @expansion=split(/\n/,$cgi->param('expansion'));
 } elsif ( $cgi->param('delim') eq 's' ) {
@@ -57,7 +61,6 @@ if ( $cgi->param('delim') eq 'n' ) {
   $1;
 } @expansion;
 
-my($expansion);
 foreach ( @expansion) {
   my(%hash)=$cust_main_county->hash;
   my($new)=new FS::cust_main_county \%hash;
index 8d274b8..3b0cdeb 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: cust_main_county.cgi,v 1.4 1999-01-18 22:47:53 ivan Exp $
+# $Id: cust_main_county.cgi,v 1.5 1999-01-19 05:13:52 ivan Exp $
 #
 # ivan@sisd.com 97-dec-16
 #
 # lose background, FS::CGI ivan@sisd.com 98-sep-2
 #
 # $Log: cust_main_county.cgi,v $
-# Revision 1.4  1999-01-18 22:47:53  ivan
+# Revision 1.5  1999-01-19 05:13:52  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.4  1999/01/18 22:47:53  ivan
 # s/create/new/g; and use fields('table_name')
 #
 # Revision 1.3  1998/12/17 08:40:21  ivan
@@ -21,6 +25,7 @@
 #
 
 use strict;
+use vars qw( $cgi );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
@@ -28,7 +33,7 @@ use FS::CGI qw(eidiot);
 use FS::Record qw(qsearch qsearchs);
 use FS::cust_main_county;
 
-my($cgi)=new CGI;
+$cgi = new CGI;
 &cgisuidsetup($cgi);
 
 foreach ( $cgi->param ) {
index 4d87704..21431f4 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: cust_pay.cgi,v 1.4 1999-01-18 22:47:54 ivan Exp $
+# $Id: cust_pay.cgi,v 1.5 1999-01-19 05:13:53 ivan Exp $
 #
 # Usage: post form to:
 #        http://server.name/path/cust_pay.cgi
 #       bmccane@maxbaud.net     98-apr-3
 #
 # $Log: cust_pay.cgi,v $
-# Revision 1.4  1999-01-18 22:47:54  ivan
+# Revision 1.5  1999-01-19 05:13:53  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.4  1999/01/18 22:47:54  ivan
 # s/create/new/g; and use fields('table_name')
 #
 # Revision 1.3  1998/12/30 23:03:28  ivan
@@ -26,6 +30,7 @@
 #
 
 use strict;
+use vars qw( $cgi $invnum $new $error );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
@@ -33,20 +38,19 @@ use FS::CGI qw(idiot popurl);
 use FS::Record qw(fields);
 use FS::cust_pay;
 
-my($cgi)=new CGI;
+$cgi = new CGI;
 &cgisuidsetup($cgi);
 
 $cgi->param('invnum') =~ /^(\d*)$/ or die "Illegal svcnum!";
-my($invnum)=$1;
+$invnum = $1;
 
-my($new) = new FS::cust_pay ( {
+$new = new FS::cust_pay ( {
   map {
     $_, scalar($cgi->param($_));
   #} qw(invnum paid _date payby payinfo paybatch)
   } fields('cust_pay')
 } );
 
-my($error);
 $error=$new->insert;
 
 if ($error) { #error!
index 9cd9e02..e8493b2 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: cust_pkg.cgi,v 1.2 1998-12-17 08:40:23 ivan Exp $
+# $Id: cust_pkg.cgi,v 1.3 1999-01-19 05:13:54 ivan Exp $
 #
 # this is for changing packages around, not for editing things within the
 # package
 #       bmccane@maxbaud.net     98-apr-3
 #
 # $Log: cust_pkg.cgi,v $
-# Revision 1.2  1998-12-17 08:40:23  ivan
+# Revision 1.3  1999-01-19 05:13:54  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.2  1998/12/17 08:40:23  ivan
 # s/CGI::Request/CGI.pm/; etc
 #
 
 use strict;
+use vars qw( $cgi $custnum @remove_pkgnums @pkgparts $pkgpart $error );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
 use FS::CGI qw(idiot popurl);
 use FS::cust_pkg;
 
-my($cgi)=new CGI; # create form object
+$cgi = new CGI; # create form object
 
 &cgisuidsetup($cgi);
 
 #untaint custnum
 $cgi->param('new_custnum') =~ /^(\d+)$/;
-my($custnum)=$1;
+$custnum = $1;
 
-my(@remove_pkgnums) = map {
+@remove_pkgnums = map {
   /^(\d+)$/ or die "Illegal remove_pkg value!";
   $1;
 } $cgi->param('remove_pkg');
 
-my(@pkgparts);
-my($pkgpart);
 foreach $pkgpart ( map /^pkg(\d+)$/ ? $1 : (), $cgi->param ) {
   my($num_pkgs)=$cgi->param("pkg$pkgpart");
   while ( $num_pkgs-- ) {
@@ -54,7 +57,7 @@ foreach $pkgpart ( map /^pkg(\d+)$/ ? $1 : (), $cgi->param ) {
   }
 }
 
-my($error) = FS::cust_pkg::order($custnum,\@pkgparts,\@remove_pkgnums);
+$error = FS::cust_pkg::order($custnum,\@pkgparts,\@remove_pkgnums);
 
 if ($error) {
   idiot($error);
index 55bf4ff..3ec3158 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: part_pkg.cgi,v 1.6 1999-01-18 22:47:56 ivan Exp $
+# $Id: part_pkg.cgi,v 1.7 1999-01-19 05:13:55 ivan Exp $
 #
 # process/part_pkg.cgi: Edit package definitions (process form)
 #
 # lose background, FS::CGI ivan@sisd.com 98-sep-2
 #
 # $Log: part_pkg.cgi,v $
-# Revision 1.6  1999-01-18 22:47:56  ivan
+# Revision 1.7  1999-01-19 05:13:55  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.6  1999/01/18 22:47:56  ivan
 # s/create/new/g; and use fields('table_name')
 #
 # Revision 1.5  1998/12/30 23:03:29  ivan
@@ -34,6 +38,7 @@
 #
 
 use strict;
+use vars qw( $cgi $pkgpart $old $new $part_svc );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
@@ -43,14 +48,14 @@ use FS::part_pkg;
 use FS::pkg_svc;
 use FS::cust_pkg;
 
-my($cgi)=new CGI;
+$cgi = new CGI;
 &cgisuidsetup($cgi);
 
-my($pkgpart)=$cgi->param('pkgpart');
+$pkgpart = $cgi->param('pkgpart');
 
-my($old)=qsearchs('part_pkg',{'pkgpart'=>$pkgpart}) if $pkgpart;
+$old = qsearchs('part_pkg',{'pkgpart'=>$pkgpart}) if $pkgpart;
 
-my($new)=new FS::part_pkg ( {
+$new = new FS::part_pkg ( {
   map {
     $_, scalar($cgi->param($_));
   } fields('part_pkg')
@@ -71,7 +76,6 @@ if ( $pkgpart ) {
   $pkgpart=$new->getfield('pkgpart');
 }
 
-my($part_svc);
 foreach $part_svc (qsearch('part_svc',{})) {
 # don't update non-changing records in part_svc (causing harmless but annoying
 # "Records identical" errors). ivan@sisd.com 98-jan-19
index b5e479d..9886015 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: part_referral.cgi,v 1.4 1999-01-18 22:47:57 ivan Exp $
+# $Id: part_referral.cgi,v 1.5 1999-01-19 05:13:56 ivan Exp $
 #
 # ivan@sisd.com 98-feb-23
 #
 # lose background, FS::CGI ivan@sisd.com 98-sep-2
 #
 # $Log: part_referral.cgi,v $
-# Revision 1.4  1999-01-18 22:47:57  ivan
+# Revision 1.5  1999-01-19 05:13:56  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.4  1999/01/18 22:47:57  ivan
 # s/create/new/g; and use fields('table_name')
 #
 # Revision 1.3  1998/12/30 23:03:30  ivan
@@ -21,6 +25,7 @@
 #
 
 use strict;
+use vars qw( $cgi $refnum $new );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
@@ -28,12 +33,12 @@ use FS::Record qw(qsearchs fields);
 use FS::part_referral;
 use FS::CGI qw(popurl eidiot);
 
-my($cgi)=new CGI;
+$cgi = new CGI;
 &cgisuidsetup($cgi);
 
-my($refnum)=$cgi->param('refnum');
+$refnum = $cgi->param('refnum');
 
-my($new)=new FS::part_referral ( {
+$new = new FS::part_referral ( {
   map {
     $_, scalar($cgi->param($_));
   } fields('part_referral')
index 5b81436..e25192c 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: part_svc.cgi,v 1.5 1999-01-18 22:47:58 ivan Exp $
+# $Id: part_svc.cgi,v 1.6 1999-01-19 05:13:57 ivan Exp $
 #
 # ivan@sisd.com 97-nov-14
 #
 # lose background, FS::CGI ivan@sisd.com 98-sep-2
 #
 # $Log: part_svc.cgi,v $
-# Revision 1.5  1999-01-18 22:47:58  ivan
+# Revision 1.6  1999-01-19 05:13:57  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.5  1999/01/18 22:47:58  ivan
 # s/create/new/g; and use fields('table_name')
 #
 # Revision 1.4  1998/12/30 23:03:31  ivan
@@ -24,6 +28,7 @@
 #
 
 use strict;
+use vars qw ( $cgi $svcpart $old $new );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
@@ -31,14 +36,14 @@ use FS::Record qw(qsearchs fields);
 use FS::part_svc;
 use FS::CGI qw(eidiot popurl);
 
-my($cgi)=new CGI;
+$cgi = new CGI;
 &cgisuidsetup($cgi);
 
-my($svcpart)=$cgi->param('svcpart');
+$svcpart = $cgi->param('svcpart');
 
-my($old)=qsearchs('part_svc',{'svcpart'=>$svcpart}) if $svcpart;
+$old = qsearchs('part_svc',{'svcpart'=>$svcpart}) if $svcpart;
 
-my($new)=new FS::part_svc ( {
+$new = new FS::part_svc ( {
   map {
     $_, scalar($cgi->param($_));
 #  } qw(svcpart svc svcdb)
index 4e4080d..7fd87ea 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: svc_acct.cgi,v 1.3 1999-01-18 22:47:59 ivan Exp $
+# $Id: svc_acct.cgi,v 1.4 1999-01-19 05:13:58 ivan Exp $
 #
 # Usage: post form to:
 #        http://server.name/path/svc_acct.cgi
 #       bmccane@maxbaud.net     98-apr-3
 #
 # $Log: svc_acct.cgi,v $
-# Revision 1.3  1999-01-18 22:47:59  ivan
+# Revision 1.4  1999-01-19 05:13:58  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.3  1999/01/18 22:47:59  ivan
 # s/create/new/g; and use fields('table_name')
 #
 # Revision 1.2  1998/12/17 08:40:27  ivan
@@ -31,6 +35,7 @@
 #
 
 use strict;
+use vars qw( $cgi $svcnum $old $new );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
@@ -38,13 +43,13 @@ use FS::CGI qw(eidiot popurl);
 use FS::Record qw(qsearchs fields);
 use FS::svc_acct;
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 &cgisuidsetup($cgi);
 
 $cgi->param('svcnum') =~ /^(\d*)$/ or die "Illegal svcnum!";
-my($svcnum)=$1;
+$svcnum = $1;
 
-my($old)=qsearchs('svc_acct',{'svcnum'=>$svcnum}) if $svcnum;
+$old = qsearchs('svc_acct',{'svcnum'=>$svcnum}) if $svcnum;
 
 #unmunge popnum
 $cgi->param('popnum', (split(/:/, $cgi->param('popnum') ))[0] );
@@ -54,7 +59,7 @@ if ( $cgi->param('_password') eq '*HIDDEN*' ) {
   $cgi->param('_password',$old->getfield('_password'));
 }
 
-my($new) = new FS::svc_acct ( {
+$new = new FS::svc_acct ( {
   map {
     $_, scalar($cgi->param($_));
   #} qw(svcnum pkgnum svcpart username _password popnum uid gid finger dir
index fac2fa4..414c6fb 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: svc_acct_pop.cgi,v 1.4 1999-01-18 22:48:00 ivan Exp $
+# $Id: svc_acct_pop.cgi,v 1.5 1999-01-19 05:13:59 ivan Exp $
 #
 # ivan@sisd.com 98-mar-8
 #
 # lose background, FS::CGI ivan@sisd.com 98-sep-2
 #
 # $Log: svc_acct_pop.cgi,v $
-# Revision 1.4  1999-01-18 22:48:00  ivan
+# Revision 1.5  1999-01-19 05:13:59  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.4  1999/01/18 22:48:00  ivan
 # s/create/new/g; and use fields('table_name')
 #
 # Revision 1.3  1998/12/30 23:03:32  ivan
@@ -21,6 +25,7 @@
 #
 
 use strict;
+use vars qw( $cgi $popnum $old $new );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
@@ -28,15 +33,15 @@ use FS::Record qw(qsearch qsearchs fields);
 use FS::svc_acct_pop;
 use FS::CGI qw(popurl eidiot);
 
-my($cgi)=new CGI; # create form object
+$cgi = new CGI; # create form object
 
 &cgisuidsetup($cgi);
 
-my($popnum)=$cgi->param('popnum');
+$popnum = $cgi->param('popnum');
 
-my($old)=qsearchs('svc_acct_pop',{'popnum'=>$popnum}) if $popnum;
+$old = qsearchs('svc_acct_pop',{'popnum'=>$popnum}) if $popnum;
 
-my($new)=new FS::svc_acct_pop ( {
+$new = new FS::svc_acct_pop ( {
   map {
     $_, scalar($cgi->param($_));
   } fields('svc_acct_pop')
index fc723d9..53650c8 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: svc_acct_sm.cgi,v 1.3 1999-01-18 22:48:01 ivan Exp $
+# $Id: svc_acct_sm.cgi,v 1.4 1999-01-19 05:14:00 ivan Exp $
 #
 # Usage: post form to:
 #        http://server.name/path/svc_acct_sm.cgi
 #       bmccane@maxbaud.net     98-apr-3
 #
 # $Log: svc_acct_sm.cgi,v $
-# Revision 1.3  1999-01-18 22:48:01  ivan
+# Revision 1.4  1999-01-19 05:14:00  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.3  1999/01/18 22:48:01  ivan
 # s/create/new/g; and use fields('table_name')
 #
 # Revision 1.2  1998/12/17 08:40:29  ivan
 #
 
 use strict;
+use vars qw( $cgi $svcnum $old $new $error );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
 use FS::Record qw(qsearchs fields);
 use FS::svc_acct_sm;
 
-my($cgi)=new CGI;
+$cgi = new CGI;
 cgisuidsetup($cgi);
 
 $cgi->param('svcnum') =~ /^(\d*)$/ or die "Illegal svcnum!";
-my($svcnum)=$1;
+$svcnum =$1;
 
-my($old)=qsearchs('svc_acct_sm',{'svcnum'=>$svcnum}) if $svcnum;
+$old = qsearchs('svc_acct_sm',{'svcnum'=>$svcnum}) if $svcnum;
 
 #unmunge domsvc and domuid
 $cgi->param('domsvc',(split(/:/, $cgi->param('domsvc') ))[0] );
 $cgi->param('domuid',(split(/:/, $cgi->param('domuid') ))[0] );
 
-my($new) = new FS::svc_acct_sm ( {
+$new = new FS::svc_acct_sm ( {
   map {
     ($_, scalar($cgi->param($_)));
   #} qw(svcnum pkgnum svcpart domuser domuid domsvc)
   } ( fields('svc_acct_sm'), qw( pkgnum svcpart) )
 } );
 
-my($error);
 if ( $svcnum ) {
   $error = $new->replace($old);
 } else {
index 992123c..4c96823 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: svc_domain.cgi,v 1.3 1999-01-18 22:48:02 ivan Exp $
+# $Id: svc_domain.cgi,v 1.4 1999-01-19 05:14:01 ivan Exp $
 #
 # Usage: post form to:
 #        http://server.name/path/svc_domain.cgi
 #       bmccane@maxbaud.net     98-apr-3
 #
 # $Log: svc_domain.cgi,v $
-# Revision 1.3  1999-01-18 22:48:02  ivan
+# Revision 1.4  1999-01-19 05:14:01  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.3  1999/01/18 22:48:02  ivan
 # s/create/new/g; and use fields('table_name')
 #
 # Revision 1.2  1998/12/17 08:40:30  ivan
@@ -28,6 +32,7 @@
 #
 
 use strict;
+use vars qw( $cgi $svcnum $new $error );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
@@ -37,20 +42,19 @@ use FS::svc_domain;
 #remove this to actually test the domains!
 $FS::svc_domain::whois_hack = 1;
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 &cgisuidsetup($cgi);
 
 $cgi->param('svcnum') =~ /^(\d*)$/ or die "Illegal svcnum!";
-my($svcnum)=$1;
+$svcnum = $1;
 
-my($new) = new FS::svc_domain ( {
+$new = new FS::svc_domain ( {
   map {
     $_, scalar($cgi->param($_));
   #} qw(svcnum pkgnum svcpart domain action purpose)
   } ( fields('svc_domain'), qw( pkgnum svcpart action purpose ) )
 } );
 
-my($error);
 if ($cgi->param('legal') ne "Yes") {
   $error = "Customer did not agree to be bound by NSI's ".
     qq!<A HREF="http://rs.internic.net/help/agreement.txt">!.
index e5cf485..af18654 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: svc_acct.cgi,v 1.5 1999-01-18 09:41:32 ivan Exp $
+# $Id: svc_acct.cgi,v 1.6 1999-01-19 05:13:43 ivan Exp $
 #
 # Usage: svc_acct.cgi {svcnum} | pkgnum{pkgnum}-svcpart{svcpart}
 #        http://server.name/path/svc_acct.cgi? {svcnum} | pkgnum{pkgnum}-svcpart{svcpart}
 # use conf/shells and dbdef username length ivan@sisd.com 98-jul-13
 #
 # $Log: svc_acct.cgi,v $
-# Revision 1.5  1999-01-18 09:41:32  ivan
+# Revision 1.6  1999-01-19 05:13:43  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.5  1999/01/18 09:41:32  ivan
 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
 # (good idea anyway)
 #
@@ -30,7 +34,9 @@
 #
 
 use strict;
-use vars qw($conf);
+use vars qw( $conf $cgi @shells $action $svcnum $svc_acct $pkgnum $svcpart
+             $part_svc $query $svc $otaker $username $password $ulen $ulen2 $p1
+             $popnum $uid $gid $finger $dir $shell $quota $slipip );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup getotaker);
@@ -39,15 +45,13 @@ use FS::Record qw(qsearch qsearchs fields);
 use FS::svc_acct;
 use FS::Conf;
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 &cgisuidsetup($cgi);
 
 $conf = new FS::Conf;
-my @shells = $conf->config('shells');
-
-my($action,$svcnum,$svc_acct,$pkgnum,$svcpart,$part_svc);
+@shells = $conf->config('shells');
 
-my($query) = $cgi->keywords;
+($query) = $cgi->keywords;
 if ( $query =~ /^(\d+)$/ ) { #editing
 
   $svcnum=$1;
@@ -67,7 +71,7 @@ if ( $query =~ /^(\d+)$/ ) { #editing
 
 } else { #adding
 
-  $svc_acct=create FS::svc_acct({}); 
+  $svc_acct = new FS::svc_acct({}); 
 
   foreach $_ (split(/-/,$query)) {
     $pkgnum=$1 if /^pkgnum(\d+)$/;
@@ -99,19 +103,19 @@ if ( $query =~ /^(\d+)$/ ) { #editing
 
 }
 
-my($svc)=$part_svc->getfield('svc');
+$svc = $part_svc->getfield('svc');
 
-my($otaker)=getotaker;
+$otaker = getotaker;
 
-my($username,$password)=(
+($username,$password)=(
   $svc_acct->username,
   $svc_acct->_password ? "*HIDDEN*" : '',
 );
 
-my($ulen)=$svc_acct->dbdef_table->column('username')->length;
-my($ulen2)=$ulen+2;
+$ulen = $svc_acct->dbdef_table->column('username')->length;
+$ulen2 = $ulen+2;
 
-my $p1 = popurl(1);
+$p1 = popurl(1);
 print $cgi->header( '-expires' => 'now' ), header("$action $svc account"), <<END;
     <FORM ACTION="${p1}process/svc_acct.cgi" METHOD=POST>
       <INPUT TYPE="hidden" NAME="svcnum" VALUE="$svcnum">
@@ -125,7 +129,7 @@ Username:
 END
 
 #pop
-my($popnum)=$svc_acct->popnum || 0;
+$popnum = $svc_acct->popnum || 0;
 if ( $part_svc->svc_acct__popnum_flag eq "F" ) {
   print qq!<INPUT TYPE="hidden" NAME="popnum" VALUE="$popnum">!;
 } else { 
@@ -143,7 +147,7 @@ if ( $part_svc->svc_acct__popnum_flag eq "F" ) {
   print "</SELECT>";
 }
 
-my($uid,$gid,$finger,$dir)=(
+($uid,$gid,$finger,$dir)=(
   $svc_acct->uid,
   $svc_acct->gid,
   $svc_acct->finger,
@@ -157,7 +161,7 @@ print <<END;
 <INPUT TYPE="hidden" NAME="dir" VALUE="$dir">
 END
 
-my($shell)=$svc_acct->shell;
+$shell = $svc_acct->shell;
 if ( $part_svc->svc_acct__shell_flag eq "F" ) {
   print qq!<INPUT TYPE="hidden" NAME="shell" VALUE="$shell">!;
 } else {
@@ -170,7 +174,7 @@ if ( $part_svc->svc_acct__shell_flag eq "F" ) {
   print "</SELECT>";
 }
 
-my($quota,$slipip)=(
+($quota,$slipip)=(
   $svc_acct->quota,
   $svc_acct->slipip,
 );
index e2c4bcd..115c467 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: svc_acct_pop.cgi,v 1.5 1999-01-18 09:41:33 ivan Exp $
+# $Id: svc_acct_pop.cgi,v 1.6 1999-01-19 05:13:44 ivan Exp $
 #
 # ivan@sisd.com 98-mar-8 
 #
 # lose background, FS::CGI ivan@sisd.com 98-sep-2
 #
 # $Log: svc_acct_pop.cgi,v $
-# Revision 1.5  1999-01-18 09:41:33  ivan
+# Revision 1.6  1999-01-19 05:13:44  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.5  1999/01/18 09:41:33  ivan
 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
 # (good idea anyway)
 #
@@ -26,6 +30,7 @@
 #
 
 use strict;
+use vars qw( $cgi $svc_acct_pop $action $query $hashref $p1 );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
@@ -33,22 +38,21 @@ use FS::Record qw(qsearch qsearchs);
 use FS::svc_acct_pop;
 use FS::CGI qw(header menubar);
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 
 &cgisuidsetup($cgi);
 
-my($svc_acct_pop,$action);
-my($query)=$cgi->keywords;
+($query)=$cgi->keywords;
 if ( $query =~ /^(\d+)$/ ) { #editing
   $svc_acct_pop=qsearchs('svc_acct_pop',{'popnum'=>$1});
   $action='Edit';
 } else { #adding
-  $svc_acct_pop=create FS::svc_acct_pop {};
+  $svc_acct_pop = new FS::svc_acct_pop {};
   $action='Add';
 }
-my($hashref)=$svc_acct_pop->hashref;
+$hashref = $svc_acct_pop->hashref;
 
-my $p1 = popurl(1);
+$p1 = popurl(1);
 print $cgi->header( '-expires' => 'now' ), header("$action POP", menubar(
   'Main Menu' => popurl(2),
   'View all POPs' => popurl(2). "browse/svc_acct_pop.cgi",
index 9acaed1..0de4fa1 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: svc_acct_sm.cgi,v 1.6 1999-01-18 09:41:34 ivan Exp $
+# $Id: svc_acct_sm.cgi,v 1.7 1999-01-19 05:13:45 ivan Exp $
 #
 # Usage: svc_acct_sm.cgi {svcnum} | pkgnum{pkgnum}-svcpart{svcpart}
 #        http://server.name/path/svc_acct_sm.cgi? {svcnum} | pkgnum{pkgnum}-svcpart{svcpart}
 # /var/spool/freeside/conf/domain ivan@sisd.com 98-jul-26
 #
 # $Log: svc_acct_sm.cgi,v $
-# Revision 1.6  1999-01-18 09:41:34  ivan
+# Revision 1.7  1999-01-19 05:13:45  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.6  1999/01/18 09:41:34  ivan
 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
 # (good idea anyway)
 #
@@ -53,7 +57,8 @@
 #
 
 use strict;
-use vars qw($conf);
+use vars qw( $conf $cgi $mydomain $action $svcnum $svc_acct_sm $pkgnum $svcpart
+             $part_svc $query %username %domain $p1 $domuser $domsvc $domuid );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
@@ -62,15 +67,14 @@ use FS::Record qw(qsearch qsearchs fields);
 use FS::svc_acct_sm;
 use FS::Conf;
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 &cgisuidsetup($cgi);
 
 $conf = new FS::Conf;
-my $mydomain = $conf->config('domain');
+$mydomain = $conf->config('domain');
 
-my($action,$svcnum,$svc_acct_sm,$pkgnum,$svcpart,$part_svc);
 
-my($query) = $cgi->keywords;
+($query) = $cgi->keywords;
 if ( $query =~ /^(\d+)$/ ) { #editing
 
   $svcnum=$1;
@@ -90,7 +94,7 @@ if ( $query =~ /^(\d+)$/ ) { #editing
 
 } else { #adding
 
-  $svc_acct_sm=create FS::svc_acct_sm({});
+  $svc_acct_sm = new FS::svc_acct_sm({});
 
   foreach $_ (split(/-/,$query)) { #get & untaint pkgnum & svcpart
     $pkgnum=$1 if /^pkgnum(\d+)$/;
@@ -113,7 +117,6 @@ if ( $query =~ /^(\d+)$/ ) { #editing
 
 }
 
-my(%username,%domain);
 if ($pkgnum) {
 
   #find all possible uids (and usernames)
@@ -171,7 +174,7 @@ if ($pkgnum) {
   die "\$action eq Add, but \$pkgnum is null!\n";
 }
 
-my $p1 = popurl(1);
+$p1 = popurl(1);
 print $cgi->header( '-expires' => 'now' ), header("Mail Alias $action", ''), <<END;
     <FORM ACTION="${p1}process/svc_acct_sm.cgi" METHOD=POST>
 END
@@ -191,7 +194,7 @@ print qq!<INPUT TYPE="hidden" NAME="pkgnum" VALUE="$pkgnum">!;
 #svcpart
 print qq!<INPUT TYPE="hidden" NAME="svcpart" VALUE="$svcpart">!;
 
-my($domuser,$domsvc,$domuid)=(
+($domuser,$domsvc,$domuid)=(
   $svc_acct_sm->domuser,
   $svc_acct_sm->domsvc,
   $svc_acct_sm->domuid,
index d40f900..45ff8bb 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: svc_domain.cgi,v 1.6 1999-01-18 09:41:35 ivan Exp $
+# $Id: svc_domain.cgi,v 1.7 1999-01-19 05:13:46 ivan Exp $
 #
 # Usage: svc_domain.cgi pkgnum{pkgnum}-svcpart{svcpart}
 #        http://server.name/path/svc_domain.cgi?pkgnum{pkgnum}-svcpart{svcpart}
 # no GOV in instructions ivan@sisd.com 98-jul-17
 #
 # $Log: svc_domain.cgi,v $
-# Revision 1.6  1999-01-18 09:41:35  ivan
+# Revision 1.7  1999-01-19 05:13:46  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.6  1999/01/18 09:41:35  ivan
 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
 # (good idea anyway)
 #
@@ -36,6 +40,8 @@
 #
 
 use strict;
+use vars qw( $cgi $action $svcnum $svc_domain $pkgnum $svcpart $part_svc
+             $query $svc $otaker $domain $p1 );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup getotaker);
@@ -43,12 +49,10 @@ use FS::CGI qw(header popurl);
 use FS::Record qw(qsearch qsearchs fields);
 use FS::svc_domain;
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 &cgisuidsetup($cgi);
 
-my($action,$svcnum,$svc_domain,$pkgnum,$svcpart,$part_svc);
-
-my($query) = $cgi->keywords;
+($query) = $cgi->keywords;
 if ( $query =~ /^(\d+)$/ ) { #editing
 
   $svcnum=$1;
@@ -68,7 +72,7 @@ if ( $query =~ /^(\d+)$/ ) { #editing
 
 } else { #adding
 
-  $svc_domain=create FS::svc_domain({});
+  $svc_domain = new FS::svc_domain({});
   
   foreach $_ (split(/-/,$query)) {
     $pkgnum=$1 if /^pkgnum(\d+)$/;
@@ -91,15 +95,13 @@ if ( $query =~ /^(\d+)$/ ) { #editing
 
 }
 
-my($svc)=$part_svc->getfield('svc');
+$svc = $part_svc->getfield('svc');
 
-my($otaker)=getotaker;
+$otaker = getotaker;
 
-my($domain)=(
-  $svc_domain->domain,
-);
+$domain = $svc_domain->domain;
 
-my $p1 = popurl(1);
+$p1 = popurl(1);
 print $cgi->header( '-expires' => 'now' ), header("$action $svc", ''), <<END;
     <FORM ACTION="${p1}process/svc_domain.cgi" METHOD=POST>
       <INPUT TYPE="hidden" NAME="svcnum" VALUE="$svcnum">
index 430aefa..2c17bae 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: bill.cgi,v 1.3 1998-12-23 03:01:13 ivan Exp $
+# $Id: bill.cgi,v 1.4 1999-01-19 05:14:02 ivan Exp $
 #
 # s/FS:Search/FS::Record/ and cgisuidsetup($cgi) ivan@sisd.com 98-mar-13
 #
@@ -8,7 +8,11 @@
 #       bmccane@maxbaud.net     98-apr-3
 #
 # $Log: bill.cgi,v $
-# Revision 1.3  1998-12-23 03:01:13  ivan
+# Revision 1.4  1999-01-19 05:14:02  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.3  1998/12/23 03:01:13  ivan
 # $cgi->keywords instead of $cgi->query_string
 #
 # Revision 1.2  1998/12/17 09:12:41  ivan
@@ -16,6 +20,7 @@
 #
 
 use strict;
+use vars qw( $cgi $query $custnum $cust_main $error );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
@@ -23,18 +28,16 @@ use FS::CGI qw(popurl eidiot);
 use FS::Record qw(qsearchs);
 use FS::cust_main;
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 &cgisuidsetup($cgi);
 
 #untaint custnum
-my($query) = $cgi->keywords;
+($query) = $cgi->keywords;
 $query =~ /^(\d*)$/;
-my($custnum)=$1;
-my($cust_main)=qsearchs('cust_main',{'custnum'=>$custnum});
+$custnum = $1;
+$cust_main = qsearchs('cust_main',{'custnum'=>$custnum});
 die "Can't find customer!\n" unless $cust_main;
 
-my($error);
-
 $error = $cust_main->bill(
 #                          'time'=>$time
                          );
index 4c5fbc7..b872944 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: cancel-unaudited.cgi,v 1.3 1998-12-23 03:02:05 ivan Exp $
+# $Id: cancel-unaudited.cgi,v 1.4 1999-01-19 05:14:03 ivan Exp $
 #
 # Usage: cancel-unaudited.cgi svcnum
 #        http://server.name/path/cancel-unaudited.cgi pkgnum
 #       bmccane@maxbaud.net     98-apr-3
 #
 # $Log: cancel-unaudited.cgi,v $
-# Revision 1.3  1998-12-23 03:02:05  ivan
+# Revision 1.4  1999-01-19 05:14:03  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.3  1998/12/23 03:02:05  ivan
 # $cgi->keywords instead of $cgi->query_string
 #
 # Revision 1.2  1998/12/17 09:12:42  ivan
@@ -26,6 +30,7 @@
 #
 
 use strict;
+use vars qw( $cgi $query $svcnum $svc_acct $cust_svc $error );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
@@ -34,18 +39,18 @@ use FS::Record qw(qsearchs);
 use FS::cust_svc;
 use FS::svc_acct;
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 &cgisuidsetup($cgi);
  
 #untaint svcnum
-my($query) = $cgi->keywords;
+($query) = $cgi->keywords;
 $query =~ /^(\d+)$/;
-my($svcnum)=$1;
+$svcnum = $1;
 
-my($svc_acct) = qsearchs('svc_acct',{'svcnum'=>$svcnum});
+$svc_acct = qsearchs('svc_acct',{'svcnum'=>$svcnum});
 &eidiot("Unknown svcnum!") unless $svc_acct;
 
-my($cust_svc) = qsearchs('cust_svc',{'svcnum'=>$svcnum});
+$cust_svc = qsearchs('cust_svc',{'svcnum'=>$svcnum});
 &eidiot(qq!This account has already been audited.  Cancel the 
     <A HREF="!. popurl(2). qq!view/cust_pkg.cgi?! . $cust_svc->getfield('pkgnum') .
     qq!pkgnum"> package</A> instead.!) 
@@ -57,8 +62,6 @@ local $SIG{QUIT} = 'IGNORE';
 local $SIG{TERM} = 'IGNORE';
 local $SIG{TSTP} = 'IGNORE';
 
-my($error);
-
 $error = $svc_acct->cancel;
 &eidiot($error) if $error;
 $error = $svc_acct->delete;
index 45afee8..27bc277 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: cancel_pkg.cgi,v 1.3 1998-12-23 03:02:54 ivan Exp $
+# $Id: cancel_pkg.cgi,v 1.4 1999-01-19 05:14:04 ivan Exp $
 #
 # Usage: cancel_pkg.cgi pkgnum
 #        http://server.name/path/cancel_pkg.cgi pkgnum
 #       bmccane@maxbaud.net     98-apr-3
 #
 # $Log: cancel_pkg.cgi,v $
-# Revision 1.3  1998-12-23 03:02:54  ivan
+# Revision 1.4  1999-01-19 05:14:04  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.3  1998/12/23 03:02:54  ivan
 # $cgi->keywords instead of $cgi->query_string
 #
 # Revision 1.2  1998/12/17 09:12:43  ivan
@@ -37,6 +41,7 @@
 #
 
 use strict;
+use vars qw ( $cgi $query $pkgnum $cust_pkg $error );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
@@ -44,17 +49,17 @@ use FS::CGI qw(eidiot popurl);
 use FS::Record qw(qsearchs);
 use FS::cust_pkg;
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 &cgisuidsetup($cgi);
  
 #untaint pkgnum
-my($query) = $cgi->keywords;
+($query) = $cgi->keywords;
 $query =~ /^(\d+)$/ || die "Illegal pkgnum";
-my($pkgnum)=$1;
+$pkgnum = $1;
 
-my($cust_pkg) = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
+$cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
 
-my($error)=$cust_pkg->cancel;
+$error = $cust_pkg->cancel;
 eidiot($error) if $error;
 
 print $cgi->redirect(popurl(2). "view/cust_main.cgi?".$cust_pkg->getfield('custnum'));
index e921c72..8cf553a 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: expire_pkg.cgi,v 1.2 1998-12-17 09:12:44 ivan Exp $
+# $Id: expire_pkg.cgi,v 1.3 1999-01-19 05:14:05 ivan Exp $
 #
 # Usage: post form to:
 #        http://server.name/path/expire_pkg.cgi
 #       bmccane@maxbaud.net     98-apr-3
 # 
 # $Log: expire_pkg.cgi,v $
-# Revision 1.2  1998-12-17 09:12:44  ivan
+# Revision 1.3  1999-01-19 05:14:05  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.2  1998/12/17 09:12:44  ivan
 # s/CGI::(Request|Base)/CGI.pm/;
 #
 
 use strict;
+use vars qw ( $cgi $date $pkgnum $cust_pkg %hash $new $error );
 use Date::Parse;
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
@@ -29,12 +34,11 @@ use FS::CGI qw(popurl eidiot);
 use FS::Record qw(qsearchs);
 use FS::cust_pkg;
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 &cgisuidsetup($cgi);
 
 #untaint date & pkgnum
 
-my($date);
 if ( $cgi->param('date') ) {
   str2time($cgi->param('date')) =~ /^(\d+)$/ or die "Illegal date";
   $date=$1;
@@ -43,13 +47,13 @@ if ( $cgi->param('date') ) {
 }
 
 $cgi->param('pkgnum') =~ /^(\d+)$/ or die "Illegal pkgnum";
-my($pkgnum)=$1;
+$pkgnum = $1;
 
-my($cust_pkg) = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
-my(%hash)=$cust_pkg->hash;
+$cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
+%hash = $cust_pkg->hash;
 $hash{expire}=$date;
-my($new)=create FS::cust_pkg ( \%hash );
-my($error) = $new->replace($cust_pkg);
+$new = new FS::cust_pkg ( \%hash );
+$error = $new->replace($cust_pkg);
 &eidiot($error) if $error;
 
 print $cgi->redirect(popurl(2). "view/cust_main.cgi?".$cust_pkg->getfield('custnum'));
index d18cfcc..208ed8e 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: link.cgi,v 1.4 1999-01-18 09:41:36 ivan Exp $
+# $Id: link.cgi,v 1.5 1999-01-19 05:14:06 ivan Exp $
 #
 # Note: Should be run setuid freeside as user nobody
 #
 # can also link on some other fields now (about time) ivan@sisd.com 98-jun-24
 #
 # $Log: link.cgi,v $
-# Revision 1.4  1999-01-18 09:41:36  ivan
+# Revision 1.5  1999-01-19 05:14:06  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.4  1999/01/18 09:41:36  ivan
 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
 # (good idea anyway)
 #
 #
 
 use strict;
+use vars qw ( %link_field $cgi $pkgnum $svcpart $query $part_svc $svc $svcdb 
+              $link_field );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
 use FS::CGI qw(popurl);
 use FS::Record qw(qsearchs);
 
-my(%link_field)=(
+%link_field = (
   'svc_acct'    => 'username',
   'svc_domain'  => 'domain',
   'svc_acct_sm' => '',
@@ -37,20 +43,19 @@ my(%link_field)=(
   'svc_wo'      => '',
 );
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 cgisuidsetup($cgi);
 
-my($pkgnum,$svcpart);
-my($query) = $cgi->keywords;
+($query) = $cgi->keywords;
 foreach $_ (split(/-/,$query)) { #get & untaint pkgnum & svcpart
   $pkgnum=$1 if /^pkgnum(\d+)$/;
   $svcpart=$1 if /^svcpart(\d+)$/;
 }
 
-my($part_svc) = qsearchs('part_svc',{'svcpart'=>$svcpart});
-my($svc) = $part_svc->getfield('svc');
-my($svcdb) = $part_svc->getfield('svcdb');
-my($link_field) = $link_field{$svcdb};
+$part_svc = qsearchs('part_svc',{'svcpart'=>$svcpart});
+$svc = $part_svc->getfield('svc');
+$svcdb = $part_svc->getfield('svcdb');
+$link_field = $link_field{$svcdb};
 
 print $cgi->header( '-expires' => 'now' ), header("Link to existing $svc account"),
       qq!<FORM ACTION="!, popurl(1), qq!process/link.cgi" METHOD=POST>!;
index 0ece426..213f154 100755 (executable)
@@ -1,12 +1,16 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: print-invoice.cgi,v 1.3 1998-12-23 03:04:24 ivan Exp $
+# $Id: print-invoice.cgi,v 1.4 1999-01-19 05:14:07 ivan Exp $
 #
 # just a kludge for now, since this duplicates in a way it shouldn't stuff from
 # Bill.pm (like $lpr) ivan@sisd.com 98-jun-16
 #
 # $Log: print-invoice.cgi,v $
-# Revision 1.3  1998-12-23 03:04:24  ivan
+# Revision 1.4  1999-01-19 05:14:07  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.3  1998/12/23 03:04:24  ivan
 # $cgi->keywords instead of $cgi->query_string
 #
 # Revision 1.2  1998/12/17 09:12:47  ivan
@@ -14,7 +18,7 @@
 #
 
 use strict;
-use vars qw($conf);
+use vars qw($conf $cgi $lpr $query $invnum $cust_bill $custnum );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
@@ -22,17 +26,17 @@ use FS::CGI qw(popurl);
 use FS::Record qw(qsearchs);
 use FS::cust_bill;
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 &cgisuidsetup($cgi);
 
 $conf = new FS::Conf;
-my $lpr = $conf->config('lpr');
+$lpr = $conf->config('lpr');
 
 #untaint invnum
-my($query) = $cgi->keywords;
+($query) = $cgi->keywords;
 $query =~ /^(\d*)$/;
-my($invnum)=$1;
-my($cust_bill)=qsearchs('cust_bill',{'invnum'=>$invnum});
+$invnum = $1;
+$cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum});
 die "Can't find invoice!\n" unless $cust_bill;
 
         open(LPR,"|$lpr") or die "Can't open $lpr: $!";
@@ -41,7 +45,7 @@ die "Can't find invoice!\n" unless $cust_bill;
           or die $! ? "Error closing $lpr: $!"
                        : "Exit status $? from $lpr";
 
-my($custnum)=$cust_bill->getfield('custnum');
+$custnum = $cust_bill->getfield('custnum');
 
 print $cgi->redirect(popurl(2). "view/cust_main.cgi?$custnum#history");
 
index aab2641..c20b473 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: link.cgi,v 1.2 1998-12-17 09:15:00 ivan Exp $
+# $Id: link.cgi,v 1.3 1999-01-19 05:14:10 ivan Exp $
 #
 # ivan@voicenet.com 97-feb-5
 #
 # can also link on some other fields now (about time) ivan@sisd.com 98-jun-24
 #
 # $Log: link.cgi,v $
-# Revision 1.2  1998-12-17 09:15:00  ivan
+# Revision 1.3  1999-01-19 05:14:10  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.2  1998/12/17 09:15:00  ivan
 # s/CGI::Request/CGI.pm/;
 #
 
 use strict;
+use vars qw ( $cgi $old $new $error );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::CGI qw(popurlidiot);
@@ -24,7 +29,7 @@ use FS::UID qw(cgisuidsetup);
 use FS::cust_svc;
 use FS::Record qw(qsearchs);
 
-my($cgi)=new CGI;
+$cgi = new CGI;
 cgisuidsetup($cgi);
 
 $cgi->param('pkgnum') =~ /^(\d+)$/; my($pkgnum)=$1;
@@ -40,15 +45,14 @@ unless ( $svcnum ) {
   $svcnum=$svc_acct->svcnum;
 }
 
-my($old)=qsearchs('cust_svc',{'svcnum'=>$svcnum});
+$old = qsearchs('cust_svc',{'svcnum'=>$svcnum});
 die "svcnum not found!" unless $old;
-my($new)=create FS::cust_svc ({
+$new = new FS::cust_svc ({
   'svcnum' => $svcnum,
   'pkgnum' => $pkgnum,
   'svcpart' => $svcpart,
 });
 
-my($error);
 $error = $new->replace($old);
 
 unless ($error) {
index 7b80964..851a53f 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: susp_pkg.cgi,v 1.3 1998-12-23 03:04:56 ivan Exp $
+# $Id: susp_pkg.cgi,v 1.4 1999-01-19 05:14:08 ivan Exp $
 #
 # Usage: susp_pkg.cgi pkgnum
 #        http://server.name/path/susp_pkg.cgi pkgnum
 #       bmccane@maxbaud.net     98-apr-3
 #
 # $Log: susp_pkg.cgi,v $
-# Revision 1.3  1998-12-23 03:04:56  ivan
+# Revision 1.4  1999-01-19 05:14:08  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.3  1998/12/23 03:04:56  ivan
 # $cgi->keywords instead of $cgi->query_string
 #
 # Revision 1.2  1998/12/17 09:12:48  ivan
 #
 
 use strict;
+use vars qw( $cgi $query $pkgnum $cust_pkg $error );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
 use FS::Record qw(qsearchs);
 use FS::cust_pkg;
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 &cgisuidsetup($cgi);
  
 #untaint pkgnum
-my($query) = $cgi->keywords;
+($query) = $cgi->keywords;
 $query =~ /^(\d+)$/ || die "Illegal pkgnum";
-my($pkgnum)=$1;
+$pkgnum = $1;
 
-my($cust_pkg) = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
+$cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
 
-my($error)=$cust_pkg->suspend;
+$error = $cust_pkg->suspend;
 &eidiot($error) if $error;
 
 print $cgi->redirect(popurl(2). "view/cust_main.cgi?".$cust_pkg->getfield('custnum'));
index 170d85f..c8bb4f4 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: unsusp_pkg.cgi,v 1.3 1998-12-23 03:05:25 ivan Exp $
+# $Id: unsusp_pkg.cgi,v 1.4 1999-01-19 05:14:09 ivan Exp $
 #
 # Usage: susp_pkg.cgi pkgnum
 #        http://server.name/path/susp_pkg.cgi pkgnum
 #       bmccane@maxbaud.net     98-apr-3
 #
 # $Log: unsusp_pkg.cgi,v $
-# Revision 1.3  1998-12-23 03:05:25  ivan
+# Revision 1.4  1999-01-19 05:14:09  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.3  1998/12/23 03:05:25  ivan
 # $cgi->keywords instead of $cgi->query_string
 #
 # Revision 1.2  1998/12/17 09:12:49  ivan
@@ -31,6 +35,7 @@
 #
 
 use strict;
+use vars qw( $cgi $query $pkgnum $cust_pkg $error );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
@@ -38,17 +43,17 @@ use FS::CGI qw(popurl eidiot);
 use FS::Record qw(qsearchs);
 use FS::cust_pkg;
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 &cgisuidsetup($cgi);
  
 #untaint pkgnum
-my($query) = $cgi->keywords;
+($query) = $cgi->keywords;
 $query =~ /^(\d+)$/ || die "Illegal pkgnum";
-my($pkgnum)=$1;
+$pkgnum = $1;
 
-my($cust_pkg) = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
+$cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
 
-my($error)=$cust_pkg->unsuspend;
+$error = $cust_pkg->unsuspend;
 &eidiot($error) if $error;
 
 print $cgi->redirect(popurl(2). "view/cust_main.cgi?".$cust_pkg->getfield('custnum'));
index 29ff781..e6dd3e3 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: cust_bill.cgi,v 1.2 1998-12-17 09:41:07 ivan Exp $
+# $Id: cust_bill.cgi,v 1.3 1999-01-19 05:14:11 ivan Exp $
 #
 # Usage: post form to:
 #        http://server.name/path/cust_bill.cgi
 #       bmccane@maxbaud.net     98-apr-3
 #
 # $Log: cust_bill.cgi,v $
-# Revision 1.2  1998-12-17 09:41:07  ivan
+# Revision 1.3  1999-01-19 05:14:11  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.2  1998/12/17 09:41:07  ivan
 # s/CGI::(Base|Request)/CGI.pm/;
 #
 
 use strict;
+use vars qw ( $cgi $invnum );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
 use FS::CGI qw(popurl idiot);
 use FS::Record qw(qsearchs);
 
-my($cgi)=new CGI;
+$cgi = new CGI;
 cgisuidsetup($cgi);
 
 $cgi->param('invnum') =~ /^\s*(FS-)?(\d+)\s*$/;
-my($invnum)=$2;
+$invnum = $2;
 
 if ( qsearchs('cust_bill',{'invnum'=>$invnum}) ) {
   print $cgi->redirect(popurl(2). "view/cust_bill.cgi?$invnum");  #redirect
index 48e8853..a50cee8 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: cust_main.cgi,v 1.5 1999-01-18 09:41:37 ivan Exp $
+# $Id: cust_main.cgi,v 1.6 1999-01-19 05:14:12 ivan Exp $
 #
 # Usage: post form to:
 #        http://server.name/path/cust_main.cgi
 # display total, use FS::CGI ivan@sisd.com 98-jul-17
 #
 # $Log: cust_main.cgi,v $
-# Revision 1.5  1999-01-18 09:41:37  ivan
+# Revision 1.6  1999-01-19 05:14:12  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.5  1999/01/18 09:41:37  ivan
 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
 # (good idea anyway)
 #
@@ -38,7 +42,7 @@
 #
 
 use strict;
-use vars qw(%ncancelled_pkgs %all_pkgs);
+use vars qw(%ncancelled_pkgs %all_pkgs $cgi @cust_main $sortby );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use IO::Handle;
@@ -48,12 +52,9 @@ use FS::Record qw(qsearch qsearchs);
 use FS::CGI qw(header menubar idiot popurl table);
 use FS::cust_main;
 
-my($cgi)=new CGI;
+$cgi = new CGI;
 cgisuidsetup($cgi);
 
-my(@cust_main);
-my($sortby);
-
 if ( $cgi->keywords ) {
   my($query)=$cgi->keywords;
   if ( $query eq 'custnum' ) {
@@ -72,10 +73,8 @@ if ( $cgi->keywords ) {
   &companysearch if ( $cgi->param('company_on') && $cgi->param('company_text') );
 }
 
-my(%ncancelled_pkgs) =
-  map { $_->custnum => [ $_->ncancelled_pkgs ] } @cust_main;
-my(%all_pkgs) = 
-  map { $_->custnum => [ $_->all_pkgs ] } @cust_main;
+%ncancelled_pkgs = map { $_->custnum => [ $_->ncancelled_pkgs ] } @cust_main;
+%all_pkgs = map { $_->custnum => [ $_->all_pkgs ] } @cust_main;
 
 if ( scalar(@cust_main) == 1 ) {
   print $cgi->redirect(popurl(2). "view/cust_main.cgi?". $cust_main[0]->custnum);
index 248833c..6685aea 100755 (executable)
@@ -1,11 +1,15 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: cust_pkg.cgi,v 1.5 1999-01-18 09:41:38 ivan Exp $
+# $Id: cust_pkg.cgi,v 1.6 1999-01-19 05:14:13 ivan Exp $
 #
 # based on search/svc_acct.cgi ivan@sisd.com 98-jul-17
 #
 # $Log: cust_pkg.cgi,v $
-# Revision 1.5  1999-01-18 09:41:38  ivan
+# Revision 1.6  1999-01-19 05:14:13  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.5  1999/01/18 09:41:38  ivan
 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
 # (good idea anyway)
 #
 #
 
 use strict;
+use vars qw ( $cgi @cust_pkg $sortby $query );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
 use FS::Record qw(qsearch qsearchs);
 use FS::CGI qw(header idiot popurl);
 
-my($cgi)=new CGI;
+$cgi = new CGI;
 &cgisuidsetup($cgi);
 
-my(@cust_pkg,$sortby);
-
-my($query)=$cgi->keywords;
+($query) = $cgi->keywords;
 #this tree is a little bit redundant
 if ( $query eq 'pkgnum' ) {
   $sortby=\*pkgnum_sort;
index 5dd33a6..f330508 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: svc_acct.cgi,v 1.5 1999-01-18 09:41:39 ivan Exp $
+# $Id: svc_acct.cgi,v 1.6 1999-01-19 05:14:14 ivan Exp $
 #
 # Usage: post form to:
 #        http://server.name/path/svc_acct.cgi
 # give service and customer info too ivan@sisd.com 98-aug-16
 #
 # $Log: svc_acct.cgi,v $
-# Revision 1.5  1999-01-18 09:41:39  ivan
+# Revision 1.6  1999-01-19 05:14:14  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.5  1999/01/18 09:41:39  ivan
 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
 # (good idea anyway)
 #
@@ -38,6 +42,7 @@
 #
 
 use strict;
+use vars qw( $cgi @svc_acct $sortby $query );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
@@ -46,12 +51,10 @@ use FS::CGI qw(header idiot popurl);
 use FS::svc_acct;
 use FS::cust_main;
 
-my($cgi)=new CGI;
+$cgi = new CGI;
 &cgisuidsetup($cgi);
 
-my(@svc_acct,$sortby);
-
-my($query)=$cgi->keywords;
+($query)=$cgi->keywords;
 $query ||= ''; #to avoid use of unitialized value errors
 #this tree is a little bit redundant
 if ( $query eq 'svcnum' ) {
index c1c5936..ecdf0bc 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: svc_acct_sm.cgi,v 1.4 1999-01-18 09:41:40 ivan Exp $
+# $Id: svc_acct_sm.cgi,v 1.5 1999-01-19 05:14:16 ivan Exp $
 #
 # Usage: post form to:
 #        http://server.name/path/svc_domain.cgi
 #       bmccane@maxbaud.net     98-apr-3
 #
 # $Log: svc_acct_sm.cgi,v $
-# Revision 1.4  1999-01-18 09:41:40  ivan
+# Revision 1.5  1999-01-19 05:14:16  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.4  1999/01/18 09:41:40  ivan
 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
 # (good idea anyway)
 #
@@ -28,7 +32,7 @@
 #
 
 use strict;
-use vars qw($conf);
+use vars qw( $conf $cgi $mydomain $domuser $svc_domain $domsvc @svc_acct_sm );
 use CGI::Request;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
@@ -36,21 +40,20 @@ use FS::CGI qw(popurl idiot header table);
 use FS::Record qw(qsearch qsearchs);
 use FS::Conf;
 
-my($cgi)=new CGI;
+$cgi = new CGI;
 &cgisuidsetup($cgi);
 
 $conf = new FS::Conf;
-my $mydomain = $conf->config('domain');
+$mydomain = $conf->config('domain');
 
 $cgi->param('domuser') =~ /^([a-z0-9_\-]{0,32})$/;
-my($domuser)=$1;
+$domuser = $1;
 
 $cgi->param('domain') =~ /^([\w\-\.]+)$/ or die "Illegal domain";
-my($svc_domain)=qsearchs('svc_domain',{'domain'=>$1})
+$svc_domain = qsearchs('svc_domain',{'domain'=>$1})
   or die "Unknown domain";
-my($domsvc)=$svc_domain->svcnum;
+$domsvc = $svc_domain->svcnum;
 
-my(@svc_acct_sm);
 if ($domuser) {
   @svc_acct_sm=qsearch('svc_acct_sm',{
     'domuser' => $domuser,
index b902bbe..cb704a3 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: svc_domain.cgi,v 1.3 1998-12-23 03:06:50 ivan Exp $
+# $Id: svc_domain.cgi,v 1.4 1999-01-19 05:14:17 ivan Exp $
 #
 # Usage: post form to:
 #        http://server.name/path/svc_domain.cgi
 # display total, use FS::CGI now does browsing too ivan@sisd.com 98-jul-17
 #
 # $Log: svc_domain.cgi,v $
-# Revision 1.3  1998-12-23 03:06:50  ivan
+# Revision 1.4  1999-01-19 05:14:17  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.3  1998/12/23 03:06:50  ivan
 # $cgi->keywords instead of $cgi->query_string
 #
 # Revision 1.2  1998/12/17 09:41:12  ivan
 #
 
 use strict;
+use vars qw ( $cgi @svc_domain $sortby $query );
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use FS::UID qw(cgisuidsetup);
 use FS::Record qw(qsearch qsearchs);
 use FS::CGI qw(header idiot popurl);
 
-my($cgi)=new CGI;
+$cgi = new CGI;
 &cgisuidsetup($cgi);
 
-my(@svc_domain);
-my($sortby);
-
-my($query)=$cgi->keywords;
+($query)=$cgi->keywords;
 if ( $query eq 'svcnum' ) {
   $sortby=\*svcnum_sort;
   @svc_domain=qsearch('svc_domain',{});
index ccfc33c..44e3a4a 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: cust_bill.cgi,v 1.5 1999-01-18 09:41:42 ivan Exp $
+# $Id: cust_bill.cgi,v 1.6 1999-01-19 05:14:18 ivan Exp $
 #
 # Note: Should be run setuid freeside as user nobody.
 #
 # also print 'printed' field ivan@sisd.com 98-jul-10
 #
 # $Log: cust_bill.cgi,v $
-# Revision 1.5  1999-01-18 09:41:42  ivan
+# Revision 1.6  1999-01-19 05:14:18  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.5  1999/01/18 09:41:42  ivan
 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
 # (good idea anyway)
 #
@@ -40,6 +44,7 @@
 #
 
 use strict;
+use vars qw ( $cgi $query $invnum $cust_bill $custnum $printed $p );
 use IO::File;
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
@@ -48,21 +53,21 @@ use FS::CGI qw(header popurl menubar);
 use FS::Record qw(qsearchs);
 use FS::cust_bill;
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 &cgisuidsetup($cgi);
 
 #untaint invnum
-my($query) = $cgi->keywords;
+($query) = $cgi->keywords;
 $query =~ /^(\d+)$/;
-my($invnum)=$1;
+$invnum = $1;
 
-my($cust_bill) = qsearchs('cust_bill',{'invnum'=>$invnum});
+$cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum});
 die "Invoice #$invnum not found!" unless $cust_bill;
-my($custnum) = $cust_bill->getfield('custnum');
+$custnum = $cust_bill->getfield('custnum');
 
-my($printed) = $cust_bill->printed;
+$printed = $cust_bill->printed;
 
-my $p = popurl(2);
+$p = popurl(2);
 print $cgi->header( '-expires' => 'now' ), header('Invoice View', menubar(
   "Main Menu" => $p,
   "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
index 71a4e51..7c5f4be 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: cust_main.cgi,v 1.9 1999-01-18 09:41:43 ivan Exp $
+# $Id: cust_main.cgi,v 1.10 1999-01-19 05:14:19 ivan Exp $
 #
 # Usage: cust_main.cgi custnum
 #        http://server.name/path/cust_main.cgi?custnum
 # lose background, FS::CGI ivan@sisd.com 98-sep-2
 #
 # $Log: cust_main.cgi,v $
-# Revision 1.9  1999-01-18 09:41:43  ivan
+# Revision 1.10  1999-01-19 05:14:19  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.9  1999/01/18 09:41:43  ivan
 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
 # (good idea anyway)
 #
@@ -60,6 +64,9 @@
 #
 
 use strict;
+use vars qw ( $cgi $query $custnum $cust_main $hashref $agent $referral 
+              @packages $package @history @bills $bill @credits $credit
+              $balance $item ); 
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
 use Date::Format;
@@ -76,7 +83,7 @@ use FS::agent;
 use FS::cust_main;
 use FS::cust_refund;
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 &cgisuidsetup($cgi);
 
 print $cgi->header( '-expires' => 'now' ), header("Customer View", menubar(
@@ -86,12 +93,12 @@ print $cgi->header( '-expires' => 'now' ), header("Customer View", menubar(
 END
 
 die "No customer specified (bad URL)!" unless $cgi->keywords;
-my($query) = $cgi->keywords; # needs parens with my, ->keywords returns array
+($query) = $cgi->keywords; # needs parens with my, ->keywords returns array
 $query =~ /^(\d+)$/;
-my($custnum)=$1;
-my($cust_main)=qsearchs('cust_main',{'custnum'=>$custnum});
+$custnum = $1;
+$cust_main = qsearchs('cust_main',{'custnum'=>$custnum});
 die "Customer not found!" unless $cust_main;
-my($hashref)=$cust_main->hashref;
+$hashref = $cust_main->hashref;
 
 #custnum
 print "<FONT SIZE=+1><CENTER>Customer #<B>$custnum</B></CENTER></FONT>",
@@ -111,7 +118,7 @@ print qq!<HR><A NAME="cust_main"><CENTER><FONT SIZE=+1>Customer Information!,
       qq!">Edit this information</A></CENTER><FONT SIZE=-1>!;
 
 #agentnum
-my($agent)=qsearchs('agent',{
+$agent = qsearchs('agent',{
   'agentnum' => $cust_main->getfield('agentnum')
 } );
 die "Agent not found!" unless $agent;
@@ -119,7 +126,7 @@ print "<BR>Agent #<B>" , $agent->getfield('agentnum') , ": " ,
                          $agent->getfield('agent') , "</B>";
 
 #refnum
-my($referral)=qsearchs('part_referral',{'refnum' => $cust_main->refnum});
+$referral = qsearchs('part_referral',{'refnum' => $cust_main->refnum});
 die "Referral not found!" unless $referral;
 print "<BR>Referral #<B>", $referral->refnum, ": ",
       $referral->referral, "<\B>"; 
@@ -215,8 +222,7 @@ print qq!<CENTER>!, table, "\n",
       qq!</TR>\n!;
 
 #get package info
-my(@packages)=qsearch('cust_pkg',{'custnum'=>$custnum});
-my($package);
+@packages = qsearch('cust_pkg',{'custnum'=>$custnum});
 foreach $package (@packages) {
   my($pref)=$package->hashref;
   my($part_pkg)=qsearchs('part_pkg',{
@@ -265,10 +271,7 @@ print qq!<CENTER><HR><A NAME="history"><FONT SIZE=+1>Payment History!,
 # major problem: this whole thing is way too sloppy.
 # minor problem: the description lines need better formatting.
 
-my(@history);
-
-my(@bills)=qsearch('cust_bill',{'custnum'=>$custnum});
-my($bill);
+@bills = qsearch('cust_bill',{'custnum'=>$custnum});
 foreach $bill (@bills) {
   my($bref)=$bill->hashref;
   push @history,
@@ -292,8 +295,7 @@ foreach $bill (@bills) {
   }
 }
 
-my(@credits)=qsearch('cust_credit',{'custnum'=>$custnum});
-my($credit);
+@credits = qsearch('cust_credit',{'custnum'=>$custnum});
 foreach $credit (@credits) {
   my($cref)=$credit->hashref;
   push @history,
@@ -328,8 +330,7 @@ END
 
 #display payment history
 
-my($balance)=0;
-my($item);
+$balance = 0;
 foreach $item (sort keyfield_numerically @history) {
   my($date,$desc,$charge,$payment,$credit,$refund)=split(/\t/,$item);
   $charge ||= 0;
index 3f6eed6..f1b7b94 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: cust_pkg.cgi,v 1.6 1999-01-18 09:41:44 ivan Exp $
+# $Id: cust_pkg.cgi,v 1.7 1999-01-19 05:14:20 ivan Exp $
 #
 # Usage: cust_pkg.cgi pkgnum
 #        http://server.name/path/cust_pkg.cgi?pkgnum
 # no FS::Search ivan@sisd.com 98-mar-7
 # 
 # $Log: cust_pkg.cgi,v $
-# Revision 1.6  1999-01-18 09:41:44  ivan
+# Revision 1.7  1999-01-19 05:14:20  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.6  1999/01/18 09:41:44  ivan
 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
 # (good idea anyway)
 #
@@ -42,6 +46,9 @@
 #
 
 use strict;
+use vars qw ( $cgi %uiview %uiadd $part_svc $query $pkgnum $cust_pkg $part_pkg
+              $custnum $susp $cancel $expire $pkg $comment $setup $bill
+              $otaker );
 use Date::Format;
 use CGI;
 use CGI::Carp qw(fatalsToBrowser);
@@ -54,11 +61,9 @@ use FS::part_pkg;
 use FS::pkg_svc;
 use FS::cust_svc;
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 cgisuidsetup($cgi);
 
-my(%uiview,%uiadd);
-my($part_svc);
 foreach $part_svc ( qsearch('part_svc',{}) ) {
   $uiview{$part_svc->svcpart} = popurl(2). "view/". $part_svc->svcdb . ".cgi";
   $uiadd{$part_svc->svcpart}= popurl(2). "edit/". $part_svc->svcdb . ".cgi";
@@ -66,22 +71,22 @@ foreach $part_svc ( qsearch('part_svc',{}) ) {
 
 print $cgi->header( '-expires' => 'now' ), header('Package View', '');
 
-my($query) = $cgi->keywords;
+($query) = $cgi->keywords;
 $query =~ /^(\d+)$/;
-my($pkgnum)=$1;
+$pkgnum = $1;
 
 #get package record
-my($cust_pkg)=qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
+$cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
 die "No package!" unless $cust_pkg;
-my($part_pkg)=qsearchs('part_pkg',{'pkgpart'=>$cust_pkg->getfield('pkgpart')});
+$part_pkg = qsearchs('part_pkg',{'pkgpart'=>$cust_pkg->getfield('pkgpart')});
 
 #nav bar
-my($custnum)=$cust_pkg->getfield('custnum');
+$custnum = $cust_pkg->getfield('custnum');
 print qq!<CENTER><A HREF="../view/cust_main.cgi?$custnum">View this customer!,
       qq! (#$custnum)</A> | <A HREF="../">Main menu</A></CENTER><BR>!;
 
 #print info
-my($susp,$cancel,$expire)=(
+($susp,$cancel,$expire)=(
   $cust_pkg->getfield('susp'),
   $cust_pkg->getfield('cancel'),
   $cust_pkg->getfield('expire'),
@@ -91,13 +96,13 @@ print qq!<BR><A HREF="#package">Package Information</A>!;
 print qq! | <A HREF="#services">Service Information</A>! unless $cancel;
 print qq!</CENTER><HR>\n!;
 
-my($pkg,$comment)=($part_pkg->getfield('pkg'),$part_pkg->getfield('comment'));
+($pkg,$comment)=($part_pkg->getfield('pkg'),$part_pkg->getfield('comment'));
 print qq!<A NAME="package"><CENTER><FONT SIZE=+1>Package Information!,
       qq!</FONT></A>!;
 print qq!<BR><A HREF="../unimp.html">Edit this information</A></CENTER>!;
 print "<P>Package: <B>$pkg - $comment</B>";
 
-my($setup,$bill)=($cust_pkg->getfield('setup'),$cust_pkg->getfield('bill'));
+($setup,$bill)=($cust_pkg->getfield('setup'),$cust_pkg->getfield('bill'));
 print "<BR>Setup: <B>", $setup ? time2str("%D",$setup) : "(Not setup)" ,"</B>";
 print "<BR>Next bill: <B>", $bill ? time2str("%D",$bill) : "" ,"</B>";
 
@@ -125,7 +130,7 @@ if ($cancel) {
 }
 
 #otaker
-my($otaker)=$cust_pkg->getfield('otaker');
+$otaker = $cust_pkg->getfield('otaker');
 print "<P>Order taken by <B>$otaker</B>";
 
 unless ($cancel) {
index 1151e1c..a5b4f48 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: svc_acct.cgi,v 1.6 1999-01-18 09:41:45 ivan Exp $
+# $Id: svc_acct.cgi,v 1.7 1999-01-19 05:14:21 ivan Exp $
 #
 # Usage: svc_acct.cgi svcnum
 #        http://server.name/path/svc_acct.cgi?svcnum
 # displays arbitrary radius attributes ivan@sisd.com 98-aug-16
 #
 # $Log: svc_acct.cgi,v $
-# Revision 1.6  1999-01-18 09:41:45  ivan
+# Revision 1.7  1999-01-19 05:14:21  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.6  1999/01/18 09:41:45  ivan
 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
 # (good idea anyway)
 #
@@ -53,7 +57,8 @@
 #
 
 use strict;
-use vars qw( $conf );
+use vars qw( $conf $cgi $mydomain $query $svcnum $svc_acct $cust_svc $pkgnum
+             $cust_pkg $custnum $part_svc $p $svc_acct_pop );
 use CGI;
 use CGI::Carp qw( fatalsToBrowser );
 use FS::UID qw( cgisuidsetup );
@@ -66,33 +71,32 @@ use FS::cust_pkg;
 use FS::part_svc;
 use FS::svc_acct_pop;
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 &cgisuidsetup($cgi);
 
 $conf = new FS::Conf;
-my $mydomain = $conf->config('domain');
+$mydomain = $conf->config('domain');
 
 #untaint svcnum
-my($query) = $cgi->keywords;
+($query) = $cgi->keywords;
 $query =~ /^(\d+)$/;
-my($svcnum)=$1;
-my($svc_acct)=qsearchs('svc_acct',{'svcnum'=>$svcnum});
+$svcnum = $1;
+$svc_acct = qsearchs('svc_acct',{'svcnum'=>$svcnum});
 die "Unkonwn svcnum" unless $svc_acct;
 
-my($cust_svc)=qsearchs('cust_svc',{'svcnum'=>$svcnum});
-my($pkgnum)=$cust_svc->getfield('pkgnum');
-my($cust_pkg,$custnum);
+$cust_svc = qsearchs('cust_svc',{'svcnum'=>$svcnum});
+$pkgnum = $cust_svc->getfield('pkgnum');
 if ($pkgnum) {
   $cust_pkg=qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
   $custnum=$cust_pkg->getfield('custnum');
 }
 
-my($part_svc)=qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } );
+$part_svc = qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } );
 die "Unkonwn svcpart" unless $part_svc;
 
 print $cgi->header( '-expires' => 'now' ), header('Account View', '');
 
-my $p = popurl(2);
+$p = popurl(2);
 if ($pkgnum || $custnum) {
   print <<END;
 <A HREF="${p}view/cust_pkg.cgi?$pkgnum">View this package (#$pkgnum)</A> | 
@@ -131,7 +135,7 @@ if (substr($svc_acct->_password,0,1) eq "*") {
 }
 
 # popnum -> svc_acct_pop record
-my($svc_acct_pop)=qsearchs('svc_acct_pop',{'popnum'=>$svc_acct->popnum});
+$svc_acct_pop = qsearchs('svc_acct_pop',{'popnum'=>$svc_acct->popnum});
 
 #pop
 print "POP: <B>", $svc_acct_pop->city, ", ", $svc_acct_pop->state,
index ab8450f..80bd489 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: svc_acct_sm.cgi,v 1.5 1999-01-18 09:41:46 ivan Exp $
+# $Id: svc_acct_sm.cgi,v 1.6 1999-01-19 05:14:22 ivan Exp $
 #
 # Usage: svc_acct_sm.cgi svcnum
 #        http://server.name/path/svc_acct_sm.cgi?svcnum
 # /var/spool/freeside/conf/domain ivan@sisd.com 98-jul-17
 #
 # $Log: svc_acct_sm.cgi,v $
-# Revision 1.5  1999-01-18 09:41:46  ivan
+# Revision 1.6  1999-01-19 05:14:22  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.5  1999/01/18 09:41:46  ivan
 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
 # (good idea anyway)
 #
 #
 
 use strict;
-use vars qw($conf);
+use vars qw($conf $cgi $mydomain $query $svcnum $svc_acct_sm $cust_svc
+            $pkgnum cust_pkg $custnum $part_svc $p $domsvc,$domuid,$domuser
+            $svc $svc_domain $domain $svc_acct $username );
 use CGI;
 use FS::UID qw(cgisuidsetup);
 use FS::CGI qw(header popurl);
 use FS::Record qw(qsearchs);
 use FS::Conf;
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 cgisuidsetup($cgi);
 
 $conf = new FS::Conf;
-my $mydomain = $conf->config('domain');
+$mydomain = $conf->config('domain');
 
 #untaint svcnum
-my($query) = $cgi->keywords;
+($query) = $cgi->keywords;
 $query =~ /^(\d+)$/;
-my($svcnum)=$1;
-my($svc_acct_sm)=qsearchs('svc_acct_sm',{'svcnum'=>$svcnum});
+$svcnum = $1;
+$svc_acct_sm = qsearchs('svc_acct_sm',{'svcnum'=>$svcnum});
 die "Unknown svcnum" unless $svc_acct_sm;
 
-my($cust_svc)=qsearchs('cust_svc',{'svcnum'=>$svcnum});
-my($pkgnum)=$cust_svc->getfield('pkgnum');
-my($cust_pkg,$custnum);
+$cust_svc = qsearchs('cust_svc',{'svcnum'=>$svcnum});
+$pkgnum = $cust_svc->getfield('pkgnum');
 if ($pkgnum) {
   $cust_pkg=qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
   $custnum=$cust_pkg->getfield('custnum');
 }
 
-my($part_svc)=qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } );
+$part_svc = qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } );
 die "Unkonwn svcpart" unless $part_svc;
 
 print $cgi->header( '-expires' => 'now' ), header('Mail Alias View');
 
-my $p = popurl(2);
+$p = popurl(2);
 if ($pkgnum || $custnum) {
   print <<END;
 <A HREF="${p}view/cust_pkg.cgi?$pkgnum">View this package (#$pkgnum)</A> | 
@@ -89,16 +94,16 @@ print <<END;
     <BASEFONT SIZE=3>
 END
 
-my($domsvc,$domuid,$domuser)=(
+($domsvc,$domuid,$domuser) = (
   $svc_acct_sm->domsvc,
   $svc_acct_sm->domuid,
   $svc_acct_sm->domuser,
 );
-my($svc) = $part_svc->svc;
-my($svc_domain)=qsearchs('svc_domain',{'svcnum'=>$domsvc});
-my($domain)=$svc_domain->domain;
-my($svc_acct)=qsearchs('svc_acct',{'uid'=>$domuid});
-my($username)=$svc_acct->username;
+$svc = $part_svc->svc;
+$svc_domain = qsearchs('svc_domain',{'svcnum'=>$domsvc});
+$domain = $svc_domain->domain;
+$svc_acct = qsearchs('svc_acct',{'uid'=>$domuid});
+$username = $svc_acct->username;
 
 #formatting
 print qq!<HR>!;
index 7fa65e0..a6de404 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: svc_domain.cgi,v 1.5 1999-01-18 09:41:47 ivan Exp $
+# $Id: svc_domain.cgi,v 1.6 1999-01-19 05:14:23 ivan Exp $
 #
 # Usage: svc_domain svcnum
 #        http://server.name/path/svc_domain.cgi?svcnum
 #       bmccane@maxbaud.net     98-apr-3
 #
 # $Log: svc_domain.cgi,v $
-# Revision 1.5  1999-01-18 09:41:47  ivan
+# Revision 1.6  1999-01-19 05:14:23  ivan
+# for mod_perl: no more top-level my() variables; use vars instead
+# also the last s/create/new/;
+#
+# Revision 1.5  1999/01/18 09:41:47  ivan
 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
 # (good idea anyway)
 #
 #
 
 use strict;
+use vars qw( $cgi $query $svcnum $svc_domain $domain $cust_svc $pkgnum 
+             $cust_pkg $custnum $part_svc $p );
 use CGI;
 use FS::UID qw(cgisuidsetup);
 use FS::CGI qw(header menubar popurl);
 use FS::Record qw(qsearchs);
 
-my($cgi) = new CGI;
+$cgi = new CGI;
 cgisuidsetup($cgi);
 
 #untaint svcnum
-my($query) = $cgi->keywords;
+($query) = $cgi->keywords;
 $query =~ /^(\d+)$/;
-my($svcnum)=$1;
-my($svc_domain)=qsearchs('svc_domain',{'svcnum'=>$svcnum});
+$svcnum = $1;
+$svc_domain = qsearchs('svc_domain',{'svcnum'=>$svcnum});
 die "Unknown svcnum" unless $svc_domain;
-my($domain)=$svc_domain->domain;
+$domain = $svc_domain->domain;
 
-my($cust_svc)=qsearchs('cust_svc',{'svcnum'=>$svcnum});
-my($pkgnum)=$cust_svc->getfield('pkgnum');
-my($cust_pkg,$custnum);
+$cust_svc = qsearchs('cust_svc',{'svcnum'=>$svcnum});
+$pkgnum = $cust_svc->getfield('pkgnum');
 if ($pkgnum) {
   $cust_pkg=qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
   $custnum=$cust_pkg->getfield('custnum');
 }
 
-my($part_svc)=qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } );
+$part_svc = qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } );
 die "Unkonwn svcpart" unless $part_svc;
 
-my $p = popurl(2);
+$p = popurl(2);
 print $cgi->header( '-expires' => 'now' ), header('Domain View', menubar(
   "Main menu" => $p,
   "View this package (#$pkgnum)" => "${p}view/cust_pkg.cgi?$pkgnum",