X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Debbugs%2FOOBase.pm;fp=Debbugs%2FOOBase.pm;h=6600e0222833fc26ac07fc26d3f02aa3f35c8f6a;hb=b1252b6797aa6a79d00a32165fb2fa8fb1bd9318;hp=0000000000000000000000000000000000000000;hpb=06424150844462de782ae112aa26c80dfa8d9401;p=debbugs.git diff --git a/Debbugs/OOBase.pm b/Debbugs/OOBase.pm new file mode 100644 index 0000000..6600e02 --- /dev/null +++ b/Debbugs/OOBase.pm @@ -0,0 +1,48 @@ +# This module is part of debbugs, and +# is released under the terms of the GPL version 2, or any later +# version (at your option). See the file README and COPYING for more +# information. +# Copyright 2018 by Don Armstrong . + +package Debbugs::OOBase; + +=head1 NAME + +Debbugs::OOBase -- OO Base class for Debbugs + +=head1 SYNOPSIS + + +=head1 DESCRIPTION + + + +=cut + +use Mouse; +use strictures 2; +use namespace::autoclean; + +has schema => (is => 'ro', isa => 'Object', + required => 0, + predicate => 'has_schema', + ); + +sub schema_argument { + my $self = shift; + if ($self->has_schema) { + return (schema => $self->schema); + } else { + return (); + } +} + +__PACKAGE__->meta->make_immutable; + +1; + +__END__ +# Local Variables: +# indent-tabs-mode: nil +# cperl-indent-level: 4 +# End: