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

NAME

MarpaX::ESLIF::URI::tel - URI::tel syntax as per RFC3966, RFC4694, RFC4715, RFC4759, RFC4904

VERSION

version 0.007

SUBROUTINES/METHODS

MarpaX::ESLIF::URI::tel inherits, and eventually overwrites some, methods of MarpaX::ESLIF::URI::_generic.

$class->bnf

Overwrites parent's bnf implementation. Returns the BNF used to parse the input.

$class->grammar

Overwrite parent's grammar implementation. Returns the compiled BNF used to parse the input as MarpaX::ESLIF::Grammar singleton.

$self->number($type)

Returns the global or local number digits. $type is either 'decoded' (default value), 'origin' or 'normalized'.

$self->is_global()

Returns a true value if number is global, else a false value.

$self->is_local()

Returns a true value if number is local, else a false value.

$self->ext($type)

Returns the extension, if any. May be undef. $type is either 'decoded' (default value), 'origin' or 'normalized'.

$self->isub($type)

Returns the isdn sub-address, if any. May be undef. $type is either 'decoded' (default value), 'origin' or 'normalized'.

$self->isub_encoding($type)

Returns the isdn sub-address encoding for transmission, if any. May be undef. $type is either 'decoded' (default value), 'origin' or 'normalized'.

$self->tgrp($type)

Returns the trunk group, if any. May be undef. $type is either 'decoded' (default value), 'origin' or 'normalized'.

$self->trunk_context($type)

Returns the trunk context, if any. May be undef. $type is either 'decoded' (default value), 'origin' or 'normalized'.

$self->phone_context($type)

Returns the phone context, if any. May be undef. $type is either 'decoded' (default value), 'origin' or 'normalized'.

$self->rn($type)

Returns the rn, if any. May be undef. $type is either 'decoded' (default value), 'origin' or 'normalized'.

$self->rn_context($type)

Returns the rn context, if any. May be undef. $type is either 'decoded' (default value), 'origin' or 'normalized'.

$self->cic($type)

Returns the cic, if any. May be undef. $type is either 'decoded' (default value), 'origin' or 'normalized'.

$self->cic_context($type)

Returns the cic context, if any. May be undef. $type is either 'decoded' (default value), 'origin' or 'normalized'.

$self->has_npdi()

Returns a true value if the URI has the npdi parameter, else a false value.

$self->has_enumdi()

Returns a true value if the URI has the enumdi parameter, else a false value.

$self->parameters($type)

Returns the parameters as an array of hashes that have the form { key => $key, value => $value }, where value may be undef, and with respect to the order of appearance in the URI. $type is either 'decoded' (default value), 'origin' or 'normalized'.

NOTES

  • Errata 203 has been applied.

  • Parameters are NOT reordered. So, since RFC3966 states that they MUST appear in lexicographical order (except for ext, isdn and phone-context), the parsing will fail in the input does not respect this sorting rule.

  • RFC4694 requires compliance with E.164 but this is not checked.

  • Any other extension, like premium rate category ("premrate" parameter), calling number verification ("verstat" parameter) etc... is not explicitly included unless an IETF exists. Note that all known extensions are implicitly supported as long as their specification is just an extensions of the "parameter" or "par" rules.

SEE ALSO

tel URI is totally case insensitive.

AUTHOR

Jean-Damien Durand <jeandamiendurand@free.fr>

COPYRIGHT AND LICENSE

This software is copyright (c) 2017 by Jean-Damien Durand.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.