The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Net::DNS::RR::LOC - DNS LOC resource record

SYNOPSIS

    use Net::DNS;
    $rr = new Net::DNS::RR('name LOC latitude longitude altitude size hp vp');

DESCRIPTION

DNS geographical location (LOC) resource records.

METHODS

The available methods are those inherited from the base class augmented by the type-specific methods defined in this package.

Use of undocumented package features or direct access to internal data structures is discouraged and could result in program termination or other unpredictable behaviour.

latitude

    $latitude = $rr->latitude;
    ($deg, $min, $sec, $ns ) = $rr->latitude;

    $rr->latitude( 42.357990 );
    $rr->latitude( 42, 21, 28.764, 'N' );
    $rr->latitude( '42 21 28.764 N' );

When invoked in scalar context, latitude is returned in degrees, a negative ordinate being south of the equator.

When invoked in list context, latitude is returned as a list of separate degree, minute, and second values followed by N or S as appropriate.

Optional replacement values may be represented as single value, list or formatted string. Trailing zero values are optional.

longitude

    $longitude = $rr->longitude;
    ($deg, $min, $sec, $ew ) = $rr->longitude;

    $rr->latitude( 71.014338 );
    $rr->latitude( 71, 0, 51.617, 'W' );
    $rr->latitude( '71 0 51.617 W' );

When invoked in scalar context, longitude is returned in degrees, a negative ordinate being west of the prime meridian.

When invoked in list context, longitude is returned as a list of separate degree, minute, and second values followed by E or W as appropriate.

altitude

    $altitude = $rr->altitude;

Represents altitude, in metres, relative to the WGS 84 reference spheroid used by GPS.

size

    $size = $rr->size;

Represents the diameter, in metres, of a sphere enclosing the described entity.

hp

    $hp = $rr->hp;

Represents the horizontal precision of the data expressed as the diameter, in metres, of the circle of error.

vp

    $vp = $rr->vp;

Represents the vertical precision of the data expressed as the total spread, in metres, of the distribution of possible values.

latlon

    ($lat, $lon) = $rr->latlon;

Returns the latitude and longitude coordinate pair as signed floating-point degrees.

version

    $version = $rr->version;
    $rr->version( $version );

Version of LOC protocol.

COPYRIGHT

Copyright (c)1997 Michael Fuhr.

Portions Copyright (c)2011 Dick Franks.

All rights reserved.

This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.

Package template (c)2009,2012 O.M.Kolkman and R.W.Franks.

SEE ALSO

perl, Net::DNS, Net::DNS::RR, RFC1876