# # Copyright (c) 2001-2015 NetApp, Inc., All Rights Reserved # Any use, modification, or distribution is prohibited # without prior written consent from NetApp, Inc. # ## @summary Library for performing operations on NateDB ## @author dl-nacl-dev@netapp.com ## @status shared ## @pod here =head1 NAME NACL::Database =head1 DESCRIPTION This library is the placeholder for having methods common across different database types =cut package NACL::Database; use strict; use warnings; use NATE::ParamSet; use Class::MethodMaker [ scalar => [ { '-static' => 1, '-default_ctor' => sub { return (uc(NATE::ParamSet::param_global->get('NATE_DB_DRIVER')) eq 'MYSQL'); }, }, 'is_mysql' ], ]; sub new { my ($pkg, %opts) = @_; my $dbh; if ($pkg->is_mysql()) { require NACL::Database::MYSQL; $dbh=NACL::Database::MYSQL->new(%opts); } return $dbh; } 1;