Commit 22ed7532 authored by Andy Yates's avatar Andy Yates
Browse files

Code originally allowed a user to not specify a DBConncetion during...

Code originally allowed a user to not specify a DBConncetion during construction. This is not the right behaviour and has now been tidied up
parent 193a3723
......@@ -94,7 +94,8 @@ use Scalar::Util qw(weaken); #Used to not hold a strong ref to DBConnection
Arg [DB_CONNECTION] : DBConnection instance to use
Returntype : Instance of helper
Exceptions : If the object given as a DBConnection is not one
Exceptions : If the object given as a DBConnection is not one or it
was undefined
Status : Stable
Creates a new instance of this object.
......@@ -111,6 +112,8 @@ sub new {
my ($db_connection) = rearrange([qw(db_connection)], @args);
my $self = bless( {}, ref($class) || $class );
throw('-DB_CONNECTION construction parameter was undefined.')
unless defined $db_connection;
$self->db_connection($db_connection);
return $self;
......@@ -118,6 +121,8 @@ sub new {
=pod
=head2 db_connection()
Arg [1] : DBConnection instance to use
Description : Sets and retrieves the DBConnection
Returntype : DBConnection if set; otherwise undef
......
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