|
Revision 9765, 1.3 kB
(checked in by hanekomu, 5 years ago)
|
r6096@nbgr: marcel | 2008-04-18 16:33:18 +0200
lang/perl/Data-Semantic-URI: initial commit
|
| Line | |
|---|
| 1 | package Data::Semantic::URI::fax; |
|---|
| 2 | |
|---|
| 3 | use strict; |
|---|
| 4 | use warnings; |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | our $VERSION = '0.03'; |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | use base qw(Data::Semantic::URI); |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | __PACKAGE__->mk_boolean_accessors(qw(nofuture)); |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | use constant REGEXP_KEYS => qw(URI fax); |
|---|
| 17 | use constant KEEP_KEYS => qw(URI scheme phone_number); |
|---|
| 18 | |
|---|
| 19 | |
|---|
| 20 | sub flags { |
|---|
| 21 | my $self = shift; |
|---|
| 22 | my @flags = $self->SUPER::flags(@_); |
|---|
| 23 | push @flags => 'nofuture' if $self->nofuture; |
|---|
| 24 | @flags; |
|---|
| 25 | } |
|---|
| 26 | |
|---|
| 27 | |
|---|
| 28 | 1; |
|---|
| 29 | |
|---|
| 30 | |
|---|
| 31 | __END__ |
|---|
| 32 | |
|---|
| 33 | {% USE p = PodGenerated %} |
|---|
| 34 | |
|---|
| 35 | =head1 NAME |
|---|
| 36 | |
|---|
| 37 | {% p.package %} - semantic data class for fax URIs |
|---|
| 38 | |
|---|
| 39 | =head1 SYNOPSIS |
|---|
| 40 | |
|---|
| 41 | my $obj = {% p.package %}->new; |
|---|
| 42 | if ($obj->is_valid($value)) { ... } |
|---|
| 43 | |
|---|
| 44 | =head1 DESCRIPTION |
|---|
| 45 | |
|---|
| 46 | This class can tell whether a value is a fax URI, as defined by RFC 2006. The |
|---|
| 47 | C<valid()> method will respect the C<nofuture> boolean attribute and the |
|---|
| 48 | inherited C<keep> boolean attribute. |
|---|
| 49 | |
|---|
| 50 | If C<nofuture> is set, future extensions are not allowed. |
|---|
| 51 | |
|---|
| 52 | If C<keep> is set, C<kept()> will return a hash with the following keys/value |
|---|
| 53 | pairs: |
|---|
| 54 | |
|---|
| 55 | =over 4 |
|---|
| 56 | |
|---|
| 57 | =item URI |
|---|
| 58 | |
|---|
| 59 | The complete URI. |
|---|
| 60 | |
|---|
| 61 | =item scheme |
|---|
| 62 | |
|---|
| 63 | The scheme. |
|---|
| 64 | |
|---|
| 65 | =item phone_number |
|---|
| 66 | |
|---|
| 67 | The phone number, including any possible add-ons like ISDN subaddress, a |
|---|
| 68 | post dial part, area specifier, service provider, etc. |
|---|
| 69 | |
|---|
| 70 | =back |
|---|
| 71 | |
|---|
| 72 | =head1 METHODS |
|---|
| 73 | |
|---|
| 74 | =over 4 |
|---|
| 75 | |
|---|
| 76 | {% p.write_methods %} |
|---|
| 77 | |
|---|
| 78 | =back |
|---|
| 79 | |
|---|
| 80 | {% p.write_inheritance %} |
|---|
| 81 | |
|---|
| 82 | =head1 SEE ALSO |
|---|
| 83 | |
|---|
| 84 | L<Regexp::Common::URI::fax> |
|---|
| 85 | |
|---|
| 86 | {% PROCESS standard_pod %} |
|---|
| 87 | |
|---|
| 88 | =cut |
|---|
| 89 | |
|---|