Skip Menu |
 

This queue is for tickets about the DBI CPAN distribution.

Report information
The Basics
Id: 77033
Status: rejected
Priority: 0/
Queue: DBI

People
Owner: Nobody in particular
Requestors: nomad [...] null.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: parse_dsn seems to fail on Strawberry Perl
Date: Mon, 7 May 2012 21:02:45 +1200
To: bug-DBI [...] rt.cpan.org
From: Mark Lawrence <nomad [...] null.net>
Download (untitled) / with headers
text/plain 469b
I don't have a Strawberry Perl system to test or reproduce this on, but cpantesters fails one of my modules on Win32 with the following: Could not parse DSN: 'dbi:SQLite:dbname=C:\Users\DSOLIM~1\AppData\Local\Temp\Test-Database-solimanod\SQLite\tdd_sqlite_solimanod_0' at C:/strawberry/cpan/build/SQL-DB-0.19_15-8yrOYF/t/../lib/App/sqldb_schema.pm line 36. I'm guessing the issue is something to do with ':' or '\' in the path. -- Mark Lawrence
Subject: Re: [rt.cpan.org #77033] parse_dsn seems to fail on Strawberry Perl
Date: Mon, 7 May 2012 21:16:45 +1200
To: Bugs in DBI via RT <bug-DBI [...] rt.cpan.org>
From: Mark Lawrence <nomad [...] null.net>
Download (untitled) / with headers
text/plain 228b
Show quoted text
> Could not parse DSN:
My apologies, this error message was generated by my code, NOT DBI. Tests indicate DBI->parse_dsn parses that string just fine. Please close this issue, sorry for the noise. Mark. -- Mark Lawrence
Subject: Re: [rt.cpan.org #77033] parse_dsn seems to fail on Strawberry Perl
Date: Mon, 7 May 2012 11:23:54 +0200
To: bug-DBI [...] rt.cpan.org
From: "H.Merijn Brand" <h.m.brand [...] xs4all.nl>
Download (untitled) / with headers
text/plain 2.5k
On Mon, 7 May 2012 05:03:09 -0400, "Mark Lawrence via RT" <bug-DBI@rt.cpan.org> wrote: Show quoted text
> Mon May 07 05:03:08 2012: Request 77033 was acted upon. > Transaction: Ticket created by nomad@null.net > Queue: DBI > Subject: parse_dsn seems to fail on Strawberry Perl > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: nomad@null.net > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=77033 > > > > I don't have a Strawberry Perl system to test or reproduce this on, but > cpantesters fails one of my modules on Win32 with the following: > > Could not parse DSN: > 'dbi:SQLite:dbname=C:\Users\DSOLIM~1\AppData\Local\Temp\Test-Database-solimanod\SQLite\tdd_sqlite_solimanod_0' > at > C:/strawberry/cpan/build/SQL-DB-0.19_15-8yrOYF/t/../lib/App/sqldb_schema.pm > line 36. > > I'm guessing the issue is something to do with ':' or '\' in the path.
With a minimal excerpt from the current DBI (1.620), that reduces to --8<--- use strict; use warnings; my $dsn = 'dbi:SQLite:dbname=C:\Users\DSOLIM~1\AppData\Local\Temp\Test-Database-solimanod\SQLite\tdd_sqlite_solimanod_0'; use Data::Peek; my %pd; @pd{qw( scheme driver attr attr_hash dsn)} = DBI->parse_dsn ($dsn); DDumper \%pd; package DBI; sub parse_dsn { my ($class, $dsn) = @_; $dsn =~ s/^(dbi):(\w*?)(?:\((.*?)\))?://i or return; my ($scheme, $driver, $attr, $attr_hash) = (lc ($1), $2, $3); $driver ||= $ENV{DBI_DRIVER} || ''; $attr_hash = {split /\s*=>?\s*|\s*,\s*/, $attr, -1} if $attr; return ($scheme, $driver, $attr, $attr_hash, $dsn); } -->8--- On Linux with perl5.14.2: $ perl rt77033.pl { attr => undef, attr_hash => undef, driver => 'SQLite', dsn => 'dbname=C:\\Users\\DSOLIM~1\\AppData\\Local\\Temp\\Test-Database-solimanod\\SQLite\\tdd_sqlite_solimanod_0', scheme => 'dbi' } On Win7 with Strawberry 5.12.1: S:\Tmp>perl rt77033.pl { attr => undef, attr_hash => undef, driver => 'SQLite', dsn => 'dbname=C:\\Users\\DSOLIM~1\\AppData\\Local\\Temp\\Test-Database-solimanod\\SQLite\\tdd_sqlite_solimanod_0', scheme => 'dbi' } Which shows no problems on either. Could you post more context? -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using perl5.00307 .. 5.14 porting perl5 on HP-UX, AIX, and openSUSE http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.