1package Net::DNS::RR::MR; 2 3use strict; 4use warnings; 5our $VERSION = (qw$Id: MR.pm 1814 2020-10-14 21:49:16Z willem $)[2]; 6 7use base qw(Net::DNS::RR); 8 9 10=head1 NAME 11 12Net::DNS::RR::MR - DNS MR resource record 13 14=cut 15 16use integer; 17 18use Net::DNS::DomainName; 19 20 21sub _decode_rdata { ## decode rdata from wire-format octet string 22 my $self = shift; 23 24 $self->{newname} = Net::DNS::DomainName1035->decode(@_); 25 return; 26} 27 28 29sub _encode_rdata { ## encode rdata as wire-format octet string 30 my $self = shift; 31 32 my $newname = $self->{newname} || return ''; 33 return $newname->encode(@_); 34} 35 36 37sub _format_rdata { ## format rdata portion of RR string. 38 my $self = shift; 39 40 my $newname = $self->{newname} || return ''; 41 return $newname->string; 42} 43 44 45sub _parse_rdata { ## populate RR from rdata in argument list 46 my $self = shift; 47 48 $self->newname(shift); 49 return; 50} 51 52 53sub newname { 54 my $self = shift; 55 56 $self->{newname} = Net::DNS::DomainName1035->new(shift) if scalar @_; 57 return $self->{newname} ? $self->{newname}->name : undef; 58} 59 60 611; 62__END__ 63 64 65=head1 SYNOPSIS 66 67 use Net::DNS; 68 $rr = Net::DNS::RR('name MR newname'); 69 70=head1 DESCRIPTION 71 72Class for DNS Mail Rename (MR) resource records. 73 74=head1 METHODS 75 76The available methods are those inherited from the base class augmented 77by the type-specific methods defined in this package. 78 79Use of undocumented package features or direct access to internal data 80structures is discouraged and could result in program termination or 81other unpredictable behaviour. 82 83 84=head2 newname 85 86 $newname = $rr->newname; 87 $rr->newname( $newname ); 88 89A domain name which specifies a mailbox which is the 90proper rename of the specified mailbox. 91 92 93=head1 COPYRIGHT 94 95Copyright (c)1997 Michael Fuhr. 96 97All rights reserved. 98 99Package template (c)2009,2012 O.M.Kolkman and R.W.Franks. 100 101 102=head1 LICENSE 103 104Permission to use, copy, modify, and distribute this software and its 105documentation for any purpose and without fee is hereby granted, provided 106that the above copyright notice appear in all copies and that both that 107copyright notice and this permission notice appear in supporting 108documentation, and that the name of the author not be used in advertising 109or publicity pertaining to distribution of the software without specific 110prior written permission. 111 112THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 113IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 114FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 115THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 116LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 117FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 118DEALINGS IN THE SOFTWARE. 119 120 121=head1 SEE ALSO 122 123L<perl>, L<Net::DNS>, L<Net::DNS::RR>, RFC1035 Section 3.3.8 124 125=cut 126