line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package URI::mssql; |
2
|
2
|
|
|
2
|
|
3267
|
use base 'URI::_odbc'; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
1253
|
|
3
|
|
|
|
|
|
|
our $VERSION = '0.21'; |
4
|
|
|
|
|
|
|
|
5
|
40
|
|
|
40
|
1
|
18307
|
sub default_port { 1433 } |
6
|
40
|
|
|
40
|
0
|
20364
|
sub canonical_engine { 'mssql' } |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub dbi_dsn { |
9
|
23
|
|
|
23
|
1
|
9056
|
my $self = shift; |
10
|
23
|
100
|
|
|
|
68
|
my $driver = shift or return $self->SUPER::dbi_dsn; |
11
|
16
|
|
|
|
|
33
|
my $lcd = lc $driver; |
12
|
16
|
100
|
|
|
|
36
|
return $self->SUPER::dbi_dsn if $lcd eq 'odbc'; |
13
|
|
|
|
|
|
|
|
14
|
13
|
50
|
|
|
|
34
|
my $class = $lcd eq 'ado' ? 'URI::_ado' |
|
|
100
|
|
|
|
|
|
15
|
|
|
|
|
|
|
: $lcd eq 'sybase' ? 'URI::sybase' |
16
|
|
|
|
|
|
|
: die "Unknown driver: $driver\n"; |
17
|
|
|
|
|
|
|
|
18
|
13
|
50
|
|
|
|
655
|
eval "require $class" or die; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# Make a copy blessed into the alternate class to get its DSN. |
21
|
13
|
|
|
|
|
65
|
my $alt = bless \"$self" => $class; |
22
|
13
|
|
|
|
|
147
|
return $alt->dbi_dsn; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 Name |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
URI::mssql - Microsoft SQL Server database URI |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 Description |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
L format for Microsoft SQL Server. |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 Interface |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
The following differences exist compared to the C interface: |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head2 Instance Methods |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head3 C |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
my $dsn = $uri->dbi_dsn; |
44
|
|
|
|
|
|
|
$dsn = $uri->dbi_dsn($driver); |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Extends the implementation of C to support a driver argument. By |
47
|
|
|
|
|
|
|
default, C returns a DSN appropriate for use with L. Pass |
48
|
|
|
|
|
|
|
"sybase" or "ado" to instead get a DSN appropriate to L or |
49
|
|
|
|
|
|
|
L, respectively. Note that DBD::ADO value is experimental and |
50
|
|
|
|
|
|
|
subject to change. L. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=cut |