From 123c0f52725a0ff4638f64118cb1994871c42374 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Sun, 30 Jun 2019 10:01:28 -0700 Subject: [PATCH] Documentation of Debbugs::Package --- Debbugs/Package.pm | 57 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 50 insertions(+), 7 deletions(-) diff --git a/Debbugs/Package.pm b/Debbugs/Package.pm index 2ca0147..b0c0a97 100644 --- a/Debbugs/Package.pm +++ b/Debbugs/Package.pm @@ -33,10 +33,35 @@ use Debbugs::Version::Binary; extends 'Debbugs::OOBase'; +=head2 name + +Name of the Package + +=head2 qualified_name + +name if binary, name prefixed with C if source + +=cut + has name => (is => 'ro', isa => 'Str', required => 1, ); +sub qualified_name { + my $self = shift; + return + # src: if source, nothing if binary + ($self->_type eq 'source' ? 'src:':'') . + $self->name; +} + + +=head2 type + +Type of the package; either C or C + +=cut + has type => (is => 'bare', isa => 'Str', lazy => 1, builder => '_build_type', @@ -52,13 +77,11 @@ sub _build_type { } } -sub qualified_name { - my $self = shift; - return - # src: if source, nothing if binary - ($self->_type eq 'source' ? 'src:':'') . - $self->name; -} +=head2 url + +url to the package + +=cut sub url { my $self = shift; @@ -85,6 +108,16 @@ around BUILDARGS => sub { return $class->$orig(%args); }; +=head2 is_source + +true if the package is a source package + +=head2 is_binary + +true if the package is a binary package + +=cut + sub is_source { return $_[0]->_type eq 'source' } @@ -93,6 +126,10 @@ sub is_binary { return $_[0]->_type eq 'binary' } +=head2 valid -- true if the package has any valid versions + +=cut + has valid => (is => 'ro', isa => 'Bool', lazy => 1, builder => '_build_valid', @@ -607,6 +644,12 @@ sub _create_version { $self->_set_version(@versions); } +=head2 package_collection + +L to get additional packages required + +=cut + # gets used to retrieve packages has 'package_collection' => (is => 'ro', isa => 'Debbugs::Collection::Package', -- 2.39.2