3 <TITLE>FS::domain_record - Object methods for domain_record records</TITLE>
4 <LINK REV="made" HREF="mailto:perl@packages.debian.org">
9 <A NAME="__index__"></A>
14 <LI><A HREF="#name">NAME</A></LI>
15 <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
16 <LI><A HREF="#description">DESCRIPTION</A></LI>
17 <LI><A HREF="#methods">METHODS</A></LI>
18 <LI><A HREF="#version">VERSION</A></LI>
19 <LI><A HREF="#bugs">BUGS</A></LI>
20 <LI><A HREF="#see also">SEE ALSO</A></LI>
26 <H1><A NAME="name">NAME</A></H1>
27 <P>FS::domain_record - Object methods for domain_record records</P>
30 <H1><A NAME="synopsis">SYNOPSIS</A></H1>
32 use FS::domain_record;</PRE>
34 $record = new FS::domain_record \%hash;
35 $record = new FS::domain_record { 'column' => 'value' };</PRE>
37 $error = $record->insert;</PRE>
39 $error = $new_record->replace($old_record);</PRE>
41 $error = $record->delete;</PRE>
43 $error = $record->check;</PRE>
46 <H1><A NAME="description">DESCRIPTION</A></H1>
47 <P>An FS::domain_record object represents an entry in a DNS zone.
48 FS::domain_record inherits from FS::Record. The following fields are currently
51 <DT><STRONG><A NAME="item_recnum_%2D_primary_key">recnum - primary key</A></STRONG><BR>
53 <DT><STRONG><A NAME="item_Domain">svcnum - Domain (see <A HREF=".././FS/svc_domain.html">the FS::svc_domain manpage</A>) of this entry</A></STRONG><BR>
55 <DT><STRONG><A NAME="item_partial">reczone - partial (or full) zone for this entry</A></STRONG><BR>
57 <DT><STRONG><A NAME="item_recaf_%2D_address_family_for_this_entry%2C_current">recaf - address family for this entry, currently only `IN' is recognized.</A></STRONG><BR>
59 <DT><STRONG><A NAME="item_entry">rectype - record type for this entry (A, MX, etc.)</A></STRONG><BR>
61 <DT><STRONG><A NAME="item_recdata_%2D_data_for_this_entry">recdata - data for this entry</A></STRONG><BR>
66 <H1><A NAME="methods">METHODS</A></H1>
68 <DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
70 Creates a new entry. To add the example to the database, see <A HREF="#insert">insert</A>.
71 <P>Note that this stores the hash reference, not a distinct copy of the hash it
72 points to. You can ask the object for a copy with the <EM>hash</EM> method.</P>
74 <DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
76 Adds this record to the database. If there is an error, returns the error,
77 otherwise returns false.
79 <DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
81 Delete this record from the database.
83 <DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
85 Replaces the OLD_RECORD with this one in the database. If there is an error,
86 returns the error, otherwise returns false.
88 <DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
90 Checks all fields to make sure this is a valid example. If there is
91 an error, returns the error, otherwise returns false. Called by the insert
96 <H1><A NAME="version">VERSION</A></H1>
97 <P>$Id: domain_record.html,v 1.3 2002-01-29 17:42:46 ivan Exp $</P>
100 <H1><A NAME="bugs">BUGS</A></H1>
101 <P>The data validation doesn't check everything it could. In particular,
102 there is no protection against bad data that passes the regex, duplicate
103 SOA records, forgetting the trailing `.', impossible IP addersses, etc. Of
104 course, it's still better than editing the zone files directly. :)</P>
107 <H1><A NAME="see also">SEE ALSO</A></H1>
108 <P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, schema.html from the base documentation.</P>