X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Debbugs%2FDB%2FResultSet%2FSuite.pm;fp=Debbugs%2FDB%2FResultSet%2FSuite.pm;h=0000000000000000000000000000000000000000;hb=1e6633a3780f4fd53fc4303852e84d13cdad2dc6;hp=c920080f251c7a171608a13dafac363c397f3dd3;hpb=466f7faff129a5699c7674f59900a92aa256175d;p=debbugs.git diff --git a/Debbugs/DB/ResultSet/Suite.pm b/Debbugs/DB/ResultSet/Suite.pm deleted file mode 100644 index c920080..0000000 --- a/Debbugs/DB/ResultSet/Suite.pm +++ /dev/null @@ -1,53 +0,0 @@ -# This module is part of debbugs, and is released -# under the terms of the GPL version 2, or any later version. See the -# file README and COPYING for more information. -# Copyright 2017 by Don Armstrong . -use utf8; -package Debbugs::DB::ResultSet::Suite; - -=head1 NAME - -Debbugs::DB::ResultSet::Suite - Suite table actions - -=head1 SYNOPSIS - - - -=head1 DESCRIPTION - - - -=cut - -use strict; -use warnings; - -use base 'DBIx::Class::ResultSet'; - -sub get_suite_id { - my ($self,$suite) = @_; - if (ref($suite)) { - if (ref($suite) eq 'HASH') { - $suite = $suite->{id} - } else { - $suite = $suite->id(); - } - } - else { - if ($suite !~ /^\d+$/) { - $suite = $self->result_source->schema-> - resultset('Suite')-> - search_rs({codename => $suite}, - {result_class => 'DBIx::Class::ResultClass::HashRefInflator', - })->first(); - if (defined $suite) { - $suite = $suite->{id}; - } - } - } - return $suite; -} - -1; - -__END__