X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=site_perl%2Fsvc_domain.pm;h=c7e1e70bd91eabce6d3de9e14826bef156a6f838;hp=1ddd5b290207559753eb4bc9fc301641dae6e496;hb=1f2d8690193476319d61b20b78461eb1a3ff106e;hpb=e2a4fff8e2f37427cf296639c82b2f63bfb6310d diff --git a/site_perl/svc_domain.pm b/site_perl/svc_domain.pm index 1ddd5b290..c7e1e70bd 100644 --- a/site_perl/svc_domain.pm +++ b/site_perl/svc_domain.pm @@ -1,8 +1,9 @@ package FS::svc_domain; use strict; -use vars qw(@ISA @EXPORT_OK $whois_hack $conf $mydomain $smtpmachine); -use Exporter; +use vars qw( @ISA $whois_hack $conf $mydomain $smtpmachine + $tech_contact $from $to @nameservers @nameserver_ips @template +); use Carp; use Mail::Internet; use Mail::Header; @@ -12,62 +13,32 @@ use FS::cust_svc; use FS::Conf; @ISA = qw(FS::Record Exporter); -@EXPORT_OK = qw(fields); - -$conf = new FS::Conf; - -$mydomain = $conf->config('domain'); -$smtpmachine = $conf->config('smtpmachine'); - -my($internic)="/var/spool/freeside/conf/registries/internic"; -my($conf_tech)="$internic/tech_contact"; -my($conf_from)="$internic/from"; -my($conf_to)="$internic/to"; -my($nameservers)="$internic/nameservers"; -my($template)="$internic/template"; - -open(TECH_CONTACT,$conf_tech) or die "Can't open $conf_tech: $!"; -my($tech_contact)=map { - /^(.*)$/ or die "Illegal line in $conf_tech!"; #yes, we trust the file - $1; -} grep $_ !~ /^(#|$)/, ; -close TECH_CONTACT; - -open(FROM,$conf_from) or die "Can't open $conf_from: $!"; -my($from)=map { - /^(.*)$/ or die "Illegal line in $conf_from!"; #yes, we trust the file - $1; -} grep $_ !~ /^(#|$)/, ; -close FROM; - -open(TO,$conf_to) or die "Can't open $conf_to: $!"; -my($to)=map { - /^(.*)$/ or die "Illegal line in $conf_to!"; #yes, we trust the file - $1; -} grep $_ !~ /^(#|$)/, ; -close TO; - -open(NAMESERVERS,$nameservers) or die "Can't open $nameservers: $!"; -my(@nameservers)=map { - /^\s*\d+\.\d+\.\d+\.\d+\s+([^\s]+)\s*$/ - or die "Illegal line in $nameservers!"; #yes, we trust the file - $1; -} grep $_ !~ /^(#|$)/, ; -close NAMESERVERS; -open(NAMESERVERS,$nameservers) or die "Can't open $nameservers: $!"; -my(@nameserver_ips)=map { - /^\s*(\d+\.\d+\.\d+\.\d+)\s+([^\s]+)\s*$/ - or die "Illegal line in $nameservers!"; #yes, we trust the file - $1; -} grep $_ !~ /^(#|$)/, ; -close NAMESERVERS; - -open(TEMPLATE,$template) or die "Can't open $template: $!"; -my(@template)=map { - /^(.*)$/ or die "Illegal line in $to!"; #yes, we trust the file - $1. "\n"; -}