| DhMakePerl documentation | Contained in the DhMakePerl distribution. |
Debian::WNPP::Bug - handy representation of Debian WNPP bug reports
my $b = Debian::WNPP::Bug->new(
{ number => 1234,
title => 'RFP: nice-package -- do nice things easier',
type => 'rfp',
package => 'nice-package',
short_description => 'do nice things together',
submitter => "Joe Developer <joe@developer.local>"
}
);
print "$b"; # 1234
Constructs new instance of the class. Initial values are to be given as a hash reference.
The unique ID of the big in the BTS.
The title of the bug. Usually something like
RFP: nice-package -- do nice things easier
The type of the WNPP bug. Either of:
request for package
intent to package
orphaned package
request for help
request for adoption
intent to adopt
Package name
The short description of the package
The bug sumbitter in the form Full Name <email@address>
Debian::WNPPBug object instances stringify via the method as_string (as_string). The
default as_string method returns the bug number.
Returns a string representing the bug type and number in the form TYPE
#number, e.g. ITP #1234.
Uset for the "" overload. Returns the bug number.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
| DhMakePerl documentation | Contained in the DhMakePerl distribution. |
package Debian::WNPP::Bug; use strict; use warnings;
use base qw(Class::Accessor); __PACKAGE__->mk_accessors( qw( number title type package short_description submitter ) );
use overload '""' => \&as_string;
sub type_and_number { my $self = shift; return $self->type . ' #' . $self->number; }
sub as_string { my $self = shift; return $self->number; }
1;