perl-DBD-Mock - Mock database driver for testing

Property Value
Distribution OpenMandriva Cooker
Repository OpenMandriva Unsupported Release x86_64
Package filename perl-DBD-Mock-1.450.0-3-omv4000.noarch.rpm
Package name perl-DBD-Mock
Package version 1.450.0
Package release 3-omv4000
Package architecture noarch
Package type rpm
Homepage -
License -
Maintainer -
Download size 47.32 KB
Installed size 99.35 KB
Testing with databases can be tricky. If you are developing a system
married to a single database then you can make some assumptions about your
environment and ask the user to provide relevant connection information.
But if you need to test a framework that uses DBI, particularly a framework
that uses different types of persistence schemes, then it may be more
useful to simply verify what the framework is trying to do -- ensure the
right SQL is generated and that the correct parameters are bound.
'DBD::Mock' makes it easy to just modify your configuration (presumably
held outside your code) and just use it instead of 'DBD::Foo' (like the
DBD::Pg manpage or the DBD::mysql manpage) in your framework.
There is no distinct area where using this module makes sense. (Some people
may successfully argue that this is a solution looking for a problem...)
Indeed, if you can assume your users have something like the DBD::AnyData
manpage or the DBD::SQLite manpage or if you do not mind creating a
dependency on them then it makes far more sense to use these legitimate
driver implementations and test your application in the real world -- at
least as much of the real world as you can create in your tests...
And if your database handle exists as a package variable or something else
easily replaced at test-time then it may make more sense to use the
Test::MockObject manpage to create a fully dynamic handle. There is an
excellent article by chromatic about using the Test::MockObject manpage in
this and other ways, strongly recommended. (See the SEE ALSO manpage for a


Package Version Architecture Repository
perl-DBD-Mock-1.450.0-3-omv4000.noarch.rpm 1.450.0 noarch OpenMandriva Unsupported Release
perl-DBD-Mock - - -


Name Value
perl >= 0
perl(DBI) -
perl(constant) -
perl(strict) -
perl(warnings) -


Name Value
perl(DBD::Mock) = 1.450.0
perl(DBD::Mock::Pool) -
perl(DBD::Mock::Pool::db) -
perl(DBD::Mock::Session) -
perl(DBD::Mock::StatementTrack) -
perl(DBD::Mock::StatementTrack::Iterator) -
perl(DBD::Mock::db) -
perl(DBD::Mock::dr) -
perl(DBD::Mock::st) -
perl-DBD-Mock = 1.450.0-3


Type URL
Binary Package perl-DBD-Mock-1.450.0-3-omv4000.noarch.rpm
Source Package perl-DBD-Mock-1.450.0-3.src.rpm

Install Howto

  1. Enable the repository in Software Repository Picker:
    # om-repo-picker
  2. Install perl-DBD-Mock rpm package:
    # dnf install perl-DBD-Mock



See Also

Package Description
perl-DBD-Sybase-1.150.0-3-omv4000.x86_64.rpm Sybase database driver for the DBI module
perl-DBD-XBase-1.50.0-3-omv4000.noarch.rpm Module for dealing with XBase files
perl-DBIx-DBSchema-0.390.0-6-omv4000.noarch.rpm Database-independent schema objects
perl-Data-Compare-1.250.0-1-omv4000.noarch.rpm Compare perl data structures
perl-Data-Dumper-Concise-2.23.0-1-omv4000.noarch.rpm Less indentation and newlines plus sub deparsing
perl-Data-Float-0.12.0-3-omv4000.noarch.rpm Details of the floating point data type
perl-Data-Hierarchy-0.340.0-5-omv4000.noarch.rpm Perl module to handle data in a hierarchical structure
perl-Data-Integer-0.4.0-4-omv4000.noarch.rpm Details of the native integer data type
perl-Data-Stream-Bulk-0.110.0-3-omv4000.noarch.rpm L<Path::Class::Dir> traversal
perl-Date-Simple-3.30.0-1-omv4000.x86_64.rpm Simple date object for perl
perl-DateTime-Format-DateManip-0.40.0-4-omv4000.noarch.rpm Perl DateTime extension to convert
perl-DateTime-Format-DateParse-0.50.0-4-omv4000.noarch.rpm Parses Date::Parse compatible formats
perl-DateTime-Format-RFC3339-1.0.5-3-omv4000.noarch.rpm Parse and format RFC3339 datetime strings
perl-Devel-ArgNames-0.30.0-5-omv4000.noarch.rpm Figure out the names of variables passed into subroutines
perl-Devel-Autoflush-0.60.0-3-omv4000.noarch.rpm Set autoflush from the command line