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

« back to all changes in this revision

Viewing changes to lib/Net/DNS/Header.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::Header;
2
2
#
3
 
# $Id: Header.pm 388 2005-06-22 10:06:05Z olaf $
 
3
# $Id: Header.pm 546 2005-12-16 15:23:03Z olaf $
4
4
#
5
5
 
6
6
use strict;
16
16
 
17
17
use constant MAX_ID => 65535;
18
18
 
19
 
$VERSION = (qw$LastChangedRevision: 388 $)[1];
 
19
$VERSION = (qw$LastChangedRevision: 546 $)[1];
20
20
 
21
21
=head1 NAME
22
22
 
49
49
 
50
50
=cut
51
51
 
 
52
 
 
53
 
52
54
{
53
55
        my $id = int rand(MAX_ID);
54
56
        
64
66
        if (@_) {
65
67
                my $data = shift;
66
68
 
67
 
                if (length($$data) < Net::DNS::HFIXEDSZ()) {
 
69
                if (length($$data) < Net::DNS::HFIXEDSZ() ) {
68
70
                        return undef;
69
71
                }
70
72
 
294
296
        my ($self) = @_;
295
297
 
296
298
        my $name = $AUTOLOAD;
297
 
        $name =~ s/.*://;
 
299
        $name =~ s/.*://o;
298
300
 
299
301
        Carp::croak "$name: no such method" unless exists $self->{$name};
300
302