Commit 14e81c45 authored by Alasdair Keyes's avatar Alasdair Keyes

Add perldoc for UUID value objects

parent 43f326c8
......@@ -34,3 +34,56 @@ sub validate {
}
1;
=head1 NAME
ValueObject::Identity::UUID - Value Object for UUIDs
=head1 SYNOPSIS
use ValueObject::Identity::UUID;
my $vo = ValueObject::Identity::UUID->new('yes');
=head1 DESCRIPTION
ValueObject::Identity::UUID provides Value Object for validation of UUID values.
Returns one of
ValueObject::Identity::UUIDv1
ValueObject::Identity::UUIDv2
ValueObject::Identity::UUIDv3
ValueObject::Identity::UUIDv4
ValueObject::Identity::UUIDv5
or Exception object ValueObject::Identity::UUID::Exception::Invalid
=head1 METHODS
=over 4
=item new($value = '')
Creates a new object
Throws ValueObject::Identity::UUID::Exception::Invalid if $value is invalid
=item validate()
Called during instantiation to validate $value
=item value()
Returns the raw value as passed in at instantiation
=back
=head1 SEE ALSO
L<ValueObject::Identity::UUIDv1>,
L<ValueObject::Identity::UUIDv2>,
L<ValueObject::Identity::UUIDv3>,
L<ValueObject::Identity::UUIDv4>,
L<ValueObject::Identity::UUIDv5>,
=cut
......@@ -15,3 +15,44 @@ sub validate {
}
1;
=head1 NAME
ValueObject::Identity::UUIDv1 - Value object for V1 UUIDs
=head1 SYNOPSIS
use ValueObject::Identity::UUIDv1;
my $vo = ValueObject::Identity::UUIDv1->new('27134617-b2ff-1f27-aa2a-9fb4732b197a');
=head1 DESCRIPTION
ValueObject::Identity::UUIDv1 provides Value Object for validation of version 1
UUIDs
=head1 METHODS
=over 4
=item new($value = '')
Creates a new object
Throws ValueObject::Identity::UUIDv1::Exception::Invalid if $value is invalid
=item validate()
Called during instantiation to validate $value
=item value()
Returns the raw value as passed in at instantiation
=back
=head1 SEE ALSO
L<ValueObject::Base>
=cut
......@@ -15,3 +15,44 @@ sub validate {
}
1;
=head1 NAME
ValueObject::Identity::UUIDv2 - Value object for V2 UUIDs
=head1 SYNOPSIS
use ValueObject::Identity::UUIDv2;
my $vo = ValueObject::Identity::UUIDv2->new('27134617-b2ff-2f27-aa2a-9fb4732b197a');
=head1 DESCRIPTION
ValueObject::Identity::UUIDv2 provides Value Object for validation of version 2
UUIDs
=head1 METHODS
=over 4
=item new($value = '')
Creates a new object
Throws ValueObject::Identity::UUIDv2::Exception::Invalid if $value is invalid
=item validate()
Called during instantiation to validate $value
=item value()
Returns the raw value as passed in at instantiation
=back
=head1 SEE ALSO
L<ValueObject::Base>
=cut
......@@ -15,3 +15,47 @@ sub validate {
}
1;
=head1 NAME
ValueObject::Identity::UUIDv3 - Value object for V3 UUIDs
=head1 SYNOPSIS
use ValueObject::Identity::UUIDv3;
'27134617-b2ff-4f27-aa2a-9fb4732b197a'
'27134617-b2ff-5f27-aa2a-9fb4732b197a'
my $vo = ValueObject::Identity::UUIDv3->new('27134617-b2ff-3f27-aa2a-9fb4732b197a');
=head1 DESCRIPTION
ValueObject::Identity::UUIDv3 provides Value Object for validation of version 3
UUIDs
=head1 METHODS
=over 4
=item new($value = '')
Creates a new object
Throws ValueObject::Identity::UUIDv3::Exception::Invalid if $value is invalid
=item validate()
Called during instantiation to validate $value
=item value()
Returns the raw value as passed in at instantiation
=back
=head1 SEE ALSO
L<ValueObject::Base>
=cut
......@@ -15,3 +15,46 @@ sub validate {
}
1;
=head1 NAME
ValueObject::Identity::UUIDv4 - Value object for V4 UUIDs
=head1 SYNOPSIS
use ValueObject::Identity::UUIDv4;
'27134617-b2ff-5f27-aa2a-9fb4732b197a'
my $vo = ValueObject::Identity::UUIDv4->new('27134617-b2ff-4f27-aa2a-9fb4732b197a');
=head1 DESCRIPTION
ValueObject::Identity::UUIDv4 provides Value Object for validation of version 4
UUIDs
=head1 METHODS
=over 4
=item new($value = '')
Creates a new object
Throws ValueObject::Identity::UUIDv4::Exception::Invalid if $value is invalid
=item validate()
Called during instantiation to validate $value
=item value()
Returns the raw value as passed in at instantiation
=back
=head1 SEE ALSO
L<ValueObject::Base>
=cut
......@@ -15,3 +15,44 @@ sub validate {
}
1;
=head1 NAME
ValueObject::Identity::UUIDv5 - Value object for V5 UUIDs
=head1 SYNOPSIS
use ValueObject::Identity::UUIDv5;
my $vo = ValueObject::Identity::UUIDv5->new('27134617-b2ff-5f27-aa2a-9fb4732b197a');
=head1 DESCRIPTION
ValueObject::Identity::UUIDv5 provides Value Object for validation of version 5
UUIDs
=head1 METHODS
=over 4
=item new($value = '')
Creates a new object
Throws ValueObject::Identity::UUIDv5::Exception::Invalid if $value is invalid
=item validate()
Called during instantiation to validate $value
=item value()
Returns the raw value as passed in at instantiation
=back
=head1 SEE ALSO
L<ValueObject::Base>
=cut
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment