1 |
%define upstream_name DBIx-Introspector |
2 |
%define upstream_version 0.001005 |
3 |
|
4 |
Name: perl-%{upstream_name} |
5 |
Version: %perl_convert_version %{upstream_version} |
6 |
Release: %mkrel 4 |
7 |
|
8 |
Summary: Detect what database you are connected to |
9 |
License: GPL+ or Artistic |
10 |
Group: Development/Perl |
11 |
Url: http://search.cpan.org/dist/%{upstream_name} |
12 |
Source0: http://www.cpan.org/modules/by-module/DBIx/%{upstream_name}-%{upstream_version}.tar.gz |
13 |
|
14 |
BuildRequires: perl(Class::Method::Modifiers) >= 1.2.0 |
15 |
BuildRequires: perl(DBD::SQLite) >= 1.400.0 |
16 |
BuildRequires: perl(DBI) >= 1.628.0 |
17 |
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.300.0 |
18 |
BuildRequires: perl(Moo) >= 1.3.1 |
19 |
BuildRequires: perl(Test::Fatal) |
20 |
BuildRequires: perl(Test::More) >= 0.990.0 |
21 |
BuildRequires: perl(Test::Roo) >= 1.2.0 |
22 |
BuildArch: noarch |
23 |
|
24 |
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}perl\\(DBIx::Introspector::Driver\\) |
25 |
|
26 |
%description |
27 |
'DBIx::Introspector' is a module factored out of the the DBIx::Class |
28 |
manpage database detection code. Most code that needs to detect which |
29 |
database it is connected to assumes that there is a one-to-one mapping from |
30 |
database drivers to database engines. Unfortunately reality is rarely that |
31 |
simple. For instance, the DBD::ODBC manpage is typically used to connect to |
32 |
SQL Server, but ODBC can be used to connect to PostgreSQL, MySQL, and |
33 |
Oracle. Additionally, while ODBC is the most common way to connect to SQL |
34 |
Server, it is not the only option, as the DBD::ADO manpage can also be |
35 |
used. |
36 |
|
37 |
'DBIx::Introspector' can correctly detect which database you are connected |
38 |
to, because it was factored out of a complex, working codebase. On top of |
39 |
that it has been written to be very extensible. So if you needed to detect |
40 |
which version of your given database you are connected to that would not be |
41 |
difficult. |
42 |
|
43 |
Furthermore, 'DBIx::Introspector' does it's best to try to detect |
44 |
information based on the dsn you give it if you have not yet connected, so |
45 |
you can possibly avoid connection or at least defer connection. |
46 |
|
47 |
%prep |
48 |
%setup -q -n %{upstream_name}-%{upstream_version} |
49 |
|
50 |
%build |
51 |
%{__perl} Makefile.PL INSTALLDIRS=vendor |
52 |
|
53 |
%make |
54 |
|
55 |
%check |
56 |
%make test |
57 |
|
58 |
%install |
59 |
%make_install |
60 |
|
61 |
%files |
62 |
%doc LICENSE META.json META.yml MYMETA.yml README |
63 |
%{_mandir}/man3/* |
64 |
%perl_vendorlib/* |