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>
21 <LI><A HREF="#history">HISTORY</A></LI>
27 <H1><A NAME="name">NAME</A></H1>
28 <P>FS::domain_record - Object methods for domain_record records</P>
31 <H1><A NAME="synopsis">SYNOPSIS</A></H1>
33 use FS::domain_record;</PRE>
35 $record = new FS::domain_record \%hash;
36 $record = new FS::domain_record { 'column' => 'value' };</PRE>
38 $error = $record->insert;</PRE>
40 $error = $new_record->replace($old_record);</PRE>
42 $error = $record->delete;</PRE>
44 $error = $record->check;</PRE>
47 <H1><A NAME="description">DESCRIPTION</A></H1>
48 <P>An FS::domain_record object represents an entry in a DNS zone.
49 FS::domain_record inherits from FS::Record. The following fields are currently
52 <DT><STRONG><A NAME="item_recnum_%2D_primary_key">recnum - primary key</A></STRONG><BR>
54 <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>
56 <DT><STRONG><A NAME="item_partial">reczone - partial (or full) zone for this entry</A></STRONG><BR>
58 <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>
60 <DT><STRONG><A NAME="item_entry">rectype - record type for this entry (A, MX, etc.)</A></STRONG><BR>
62 <DT><STRONG><A NAME="item_recdata_%2D_data_for_this_entry">recdata - data for this entry</A></STRONG><BR>
67 <H1><A NAME="methods">METHODS</A></H1>
69 <DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
71 Creates a new entry. To add the example to the database, see <A HREF="#insert">insert</A>.
72 <P>Note that this stores the hash reference, not a distinct copy of the hash it
73 points to. You can ask the object for a copy with the <EM>hash</EM> method.</P>
75 <DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
77 Adds this record to the database. If there is an error, returns the error,
78 otherwise returns false.
80 <DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
82 Delete this record from the database.
84 <DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
86 Replaces the OLD_RECORD with this one in the database. If there is an error,
87 returns the error, otherwise returns false.
89 <DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
91 Checks all fields to make sure this is a valid example. If there is
92 an error, returns the error, otherwise returns false. Called by the insert
97 <H1><A NAME="version">VERSION</A></H1>
98 <P>$Id: domain_record.html,v 1.1 2001-04-23 12:41:57 ivan Exp $</P>
101 <H1><A NAME="bugs">BUGS</A></H1>
102 <P>The data validation doesn't check everything it could. In particular,
103 there is no protection against bad data that passes the regex, duplicate
104 SOA records, forgetting the trailing `.', impossible IP addersses, etc. Of
105 course, it's still better than editing the zone files directly. :)</P>
108 <H1><A NAME="see also">SEE ALSO</A></H1>
109 <P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, schema.html from the base documentation.</P>
112 <H1><A NAME="history">HISTORY</A></H1>
113 <P>$Log: domain_record.html,v $
114 <P>Revision 1.1 2001-04-23 12:41:57 ivan
115 <P>new API documentation
117 Revision 1.1 2000/02/03 05:16:52 ivan
118 beginning of DNS and Apache support</P>