~ubuntu-branches/ubuntu/trusty/libnet-dns-perl/trusty-proposed

« back to all changes in this revision

Viewing changes to lib/Net/DNS/RR/NAPTR.pm

  • Committer: Bazaar Package Importer
  • Author(s): Florian Hinzmann
  • Date: 2006-03-31 18:51:36 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20060331185136-gpxyhfnnnt9f9b1n
Tags: 0.57-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
package Net::DNS::RR::NAPTR;
2
2
#
3
 
# $Id: NAPTR.pm 388 2005-06-22 10:06:05Z olaf $
 
3
# $Id: NAPTR.pm 551 2005-12-22 11:10:37Z olaf $
4
4
#
5
5
use strict;
6
6
BEGIN { 
9
9
use vars qw(@ISA $VERSION);
10
10
 
11
11
@ISA     = qw(Net::DNS::RR);
12
 
$VERSION = (qw$LastChangedRevision: 388 $)[1];
 
12
$VERSION = (qw$LastChangedRevision: 551 $)[1];
 
13
 
 
14
 
 
15
 
 
16
 
 
17
__PACKAGE__->set_rrsort_func("order",
 
18
                               sub {
 
19
                                   my ($a,$b)=($Net::DNS::a,$Net::DNS::b);
 
20
                                   $a->{'order'} <=> $b->{'order'}
 
21
                                   ||
 
22
                                       $a->{'preference'} <=> $b->{'preference'}
 
23
}
 
24
);
 
25
 
 
26
 
 
27
__PACKAGE__->set_rrsort_func("default_sort",
 
28
                               __PACKAGE__->get_rrsort_func("order")
 
29
 
 
30
    );
 
31
 
 
32
__PACKAGE__->set_rrsort_func("preference",
 
33
                               sub {
 
34
                                   my ($a,$b)=($Net::DNS::a,$Net::DNS::b);
 
35
                                   $a->{"preference"} <=> $b->{"preference"}
 
36
                                   ||
 
37
                                       $a->{"order"} <=> $b->{"order"}
 
38
}
 
39
);
 
40
 
 
41
 
13
42
 
14
43
sub new {
15
44
        my ($class, $self, $data, $offset) = @_;
165
194
Copyright (c) 1997-2002 Michael Fuhr. 
166
195
 
167
196
Portions Copyright (c) 2002-2004 Chris Reinhardt.
 
197
Portions Copyright (c) 2005 Olaf Kolkman NLnet Labs.
168
198
 
169
199
All rights reserved.  This program is free software; you may redistribute
170
200
it and/or modify it under the same terms as Perl itself.